I am trying to run a Rails app on thin.
I followed this tutorial http://www.funonrails.com/2010/03/nginx-and-thin-installation-and.html
After doing sudo service thin start
Following is the error in the开发者_运维问答 thin log file
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/source.rb:552:in load_spec_files': http://github.com/mislav/will_paginate.git (at rails3) is not checked out. Please run
bundle install` (Bundler::GitError)
I have already run bundle install, and it has run successfully. A mongrel server on the same app runs fine.
What could be the problem.
Your problem is probably that you are running sudo service thin start
. This now uses the root environment for ruby instead of your regular user. So in the root ruby environment bundler can't find the gems that you installed as your unprivileged user.
To prove that this is the case try running ./script/server thin
or rails server thin
to verify this.
The problem is that bundler installs the gems to your ~/.bundle. When you run bundler as root, passenger won’t be able to find the gems in /root/.bundle.
A solution is easy: bundle install .bundle will install the gems to ./.bundle, which should be your rails root directory.
The only thing I can think of is that possibly you have two different rubies on one system, and the one thin is using hasn't had bundle install run on it.
精彩评论