New to Vagrant, could use some help


(cpradio) #1

Okay, so I’m trying to get an idea of how discourse operates, so I cloned the repo and started vagrant. Apart from NFS not being installed locally, I got everything running on the first try.

However, now we are at my limit of knowledge. I go into the Admin area and I’m greeted with a lot of potential problems :smile: It looks like I can ignore most of them, but these strike me as important (not in any particular order).

  • Your server is running in development mode.
  • You are running a version of Ruby 2.0.0 that is known to have problems. Upgrade to patch level 247 or later.
  • Your config/database.yml file is using the default localhost hostname. Update it to use your site’s hostname.
  • Sidekiq is not running. Many tasks, like sending emails, are executed asynchronously by sidekiq. Please ensure at least one sidekiq process is running. Learn about Sidekiq here.

Can someone help me get these resolved? I’m proficient with running commands, but I’ll likely ask a lot more questions, if it doesn’t immediately make sense to me.

Last but not least, I noticed when I ran bundle exec rails s, it seems to control discourse being available. Is there a way to make discourse available and exit out of the ssh console? (Sorry, I’m terribly new when it comes to rails, vagrant, and everything in between)


(cpradio) #2

Just discovered vagrant.screen in docs. That solved my sidekiq issue :smile: but I still get a complaint at the version check


(Kai) #3

Since this is an instance runnig on your local machine I would ignore most warnings for now. Just enter *_urlsettings etc. Please see this guide for more information about the Vagrant setup. Especially the part on “Sending Email”.


(Kai) #4

bundle exec rails s starts the local server (in development mode). If you quit, the server shuts down. I’d simply leave the SSH connection open until you don’t need it anymore.


(cpradio) #5

Yeah, I got it running, as I already found that document, then I found the screen command that lets me startup all components in separate screens (granted, I had to install screen before I could use it).

Unfortunately, the version check still fails :confused:, so I haven’t a clue if sidekiq is truly working or not.


(Mittineague) #6

I don’t know if this i still a valid fix, but the edit worked for me

# gem 'sidekiq' // added to gemfile
gem 'sidekiq', '~> 2.17.6'

(cpradio) #7

Sidekiq seems to be running, but I still get the error in the Admin Dashboard…

vagrant   3370  0.0  0.1   5188  1112 pts/3    Ss+  18:18   0:00 bash -c echo Starting sidekiq...;       cd /vagrant; bundle exec sidekiq
vagrant   3372  2.9 13.2 207408 135624 pts/3   Sl+  18:18   0:12 sidekiq 3.0.0 vagrant[1 of 25 busy]                                                                                     
vagrant   3605  0.0  0.0   4388   840 pts/4    S+   18:26   0:00 grep --color=auto sidekiq```

(cpradio) #8

I found this in my log (no idea if it is related)
/vagrant/config/initializers/sidekiq.rb:33:in `block (2 levels) in <top (required)>' Failed to log exception Error connecting to Redis on localhost:6379 (ECONNREFUSED) {:current_db=>"default", :current$ Reason: Error connecting to Redis on localhost:6379 (ECONNREFUSED)