I have the same problem when I try to start a Unicorn server
Starting Unicorn web server unicorn /usr/local/rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- unicorn/launcher (LoadError) from /usr/local/rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/bin/unicorn:3:in `<main>'
However, Unicorn works great when I launch it from the rails application folder, just using the unicorn command.
I tried what you offer by setting the unicorn gem
gem install 'unicorn'
But this does not change the result.
I check which stone is installed:
which gem 'unicorn' /usr/local/rvm/rubies/ruby-2.0.0-p353/bin/gem /usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn
I run the unicorn from the etc / init.d script file, which you can see here:
http://pastebin.com/qvwdmRJ2
and here for the default configuration:
http://pastebin.com/84FBQjMp
There seems to be some problem with the default PATH file configuration:
PATH=/usr/local/rvm/rubies/ruby-2.0.0-p353/bin:/home/unicorn/.rvm/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:$
Because, since I updated it with the new version installed, I get the error message shown at the top. If I delete it, Unicorn βapparently startsβ, but the log shows crazy activity and nginx shows a blank screen.
Iβm trying to find a solution and will share it here as soon as I find it.
thanks for the help
* UPDATE *
OK I found problems:
1) for the file /etc/init.d script:
You need to create a wrapper for Unicorn to work in the init.d script file:
rvm wrapper 2.0.0 ruby-2.0.0 unicorn
then replace the line
DAEMON = / usr / bin / unicorn
with this:
DAEMON = / USR / local / rbm / bin / ruby ββ2.0.0_unicorn
And now the team
unicorn service launch
more about rvm wrapper here: https://rvm.io/integration/init-d
2) I also had another problem that was difficult to identify in the journal:
I did not create the config / environment / staging.rb file