Papzord
Papzord

Reputation: 408

Thin doesn't start rails server

I have a ubuntu server with rails(rvm) + nginx + thin.

Nginx is listening to porst 3000-3 and works good if I start rails manually, so I guess the problem is with thin.

I've configured thin to start 3 server instances in ports 3000,3001,3002 but they don't start and report no error.

I only have a file in /etc/thin, is this normal or am I missing something? The file is the railsapp.yml.

If I run bundle exec thin start, it runs ok.

Edit: I get an error when running:

thin start --all /etc/thin

This is the error in log:

/home/metaloviana/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:31:in `block in setup': You have already activated rack 1.4.1, but your Gemfile requires rack 1.3.5. Using bundle exec may solve this. (Gem::LoadError)

EDIT 2:

Problem solved. Using railsgems-bundler and rvm wrapper.

Thanks guys!

Upvotes: 0

Views: 2083

Answers (1)

Siwei
Siwei

Reputation: 21569

agree with @shime.

The error log indicates rubygem found many rakes of different version, and it doesn't know which version to use.

Remember, always use "bundle exec" to execute the rake tasks, e.g.

bundle exec thin start 
bundle exec rake db:migrate
bundle exec rspec spec
bundle exec rails generate scaffold...

Upvotes: 2

Related Questions