GitHub User: wanchic
Solved! I received some help on this. I figured it had something to do with environment variables getting lost, and I was right. unicorn needs to have an rvm ruby wrapper around it, by executing:
rvm wrapper 1.9.3 ruby-1.9.3 unicorn
and it creates a new init script to run called:
afterwards you'll need to modify the unicorn_init.sh $CMD to read something like:
/usr/local/rvm/bin/ruby-1.9.3_unicorn -D -c $APP_ROOT/config/unicorn.rb -E production
See http://stackoverflow.com/questions/10454292/ubuntu-12-04-unicorn-init-sh-start-works-but-service-unicorn-init-start-do for more info.
Problem in Ubuntu Server
If I run $ /etc/init.d/unicorn start, it runs just fine.
If I run $ service unicorn start, I get this error:
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in 'require': cannot load such file -- bundler/setup (LoadError)
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in 'require'
from /var/rails/mbiri/shs/bin/unicorn:14:in ''
I cannot figure out why /etc/init.d would work, but service would not. It's driving me crazy trying to find the answer. I also think this is the reason why unicorn won't start on boot, because I'v already ran update-rc.d
I cannot seem to get that to work under Ubuntu. Any ideas?
Your correct, vagrant is not necessary. You can set everything up as usual. But where you might ask?
On server, I create the projects directory under /var/rails and somtimes suffixed with ./client-foo/project-bar
This is in tradition where apache sites are stored under /var/www.
So in other words, instead of:
Dido on that request.
I discovered this link. It might be of help:
Thin vs unicorn vs passenger (http://www.ruby-forum.com/topic/1822610)
If I have a production site in a separate folder (www.somesite.com/appFolder/), then I'm not able to get the tokenInput to work correctly. Instead of:
I need to say something like:
Is there a DRY way to do this so I do not have to manually edit the code on the production site every time? Thanks.
Yes, I was able to get this working in 3.1, coffescript style:
What is the HTML supposed to look like again?