Question

I am trying to use thin to serve a Ruby on Rails application on a Windows host.

When I run

thin start

I get the following error:

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler- 1.3.4/lib/bundler/runtime.rb:33:in `block in setup': You have already activated rack 1.5.0, but your Gemfile requires rack 1.4.5. Using bundle exec may solve this. (Gem::LoadError)

After I try to resolve the dependency by running:

gem install rack -v 1.4.5

I get the following error:

C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247: in `to_specs': Could not find rack (>= 1.5.0) amongst...[list of installed gems].

I take it that the problem is that thin requires rack 1.5.0 but that my project requires rack 1.4.5. How can I resolve this and get thin to start correctly? I am new to Rails and somewhat confused about what to do.

I don't want to add thin to my bundle and use bundle exec because the project does not require thin itself - I just want to use it as an application server.

Is it possible to install the two versions of rack side by side? Alternatively, how can I upgrade my project to use rack 1.5.0 so that it uses the same version required by thin? I am running thin 1.6.0, Rails 3.2.9 and Ruby 1.9.3.

Many thanks for any help.

Was it helpful?

Solution

Try updating your Gemfile, by adding gem 'rack', '1.5.0' and removing the existing rack entry. If you have updated Rack to another version than 1.5.0, in the meantime, then just do gem 'rack' or gem 'rack', '"your_version"'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top