Correct Guardfile definition for Unicorn?
Closed this issue · 2 comments
netwire88 commented
Hi,
I want to ensure the documentation on using guard rails with Unicorn is correct. I have the following setting in my Guardfile according to the instructions.
guard 'rails', :port => 5003, :environment => 'test', :server => :unicorn, :preloading => true do
watch('Gemfile.lock')
watch(%r{^(config|lib)/.*})
end
However, I'm getting this:
22:18:36 - INFO - Guard is using TerminalTitle to send notifications.
22:18:36 - INFO - Guard::RSpec is running
22:18:36 - INFO - [Guard::Rails] will start unicorn on port 5003 in test.
22:18:36 - INFO - Starting Rails...
Exiting
/Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- rack/handler/unicorn (LoadError)
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/handler.rb:63:in `try_require'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/handler.rb:16:in `get'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/server.rb:272:in `server'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.14/lib/rails/commands/server.rb:59:in `start'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.14/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.14/lib/rails/commands.rb:50:in `tap'
from /Users/user123/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.14/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
22:19:06 - INFO - Rails NOT started, check your log files.
Any ideas what I'm doing wrong?
ranmocy commented
Can you check if your unicorn be installed properly?
And what if run rails server with unicorn directly from the shell?
ranmocy commented
No response, closed.