cannot load such file -- thin (LoadError) while running rackup private_pub.ru -s thin -E production command
Asked Answered
S

2

5

I am referring to the pub railscast tutorial and have followed all steps properly but while running last command i.e.

rackup private_pub.ru -s thin -E production

to rackup the faye server I am getting following error:

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- thin (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler/thin.rb:1:in `<top (required)>'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler.rb:20:in `const_get'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler.rb:20:in `block in get'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler.rb:20:in `each'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler.rb:20:in `inject'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler.rb:20:in `get'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:268:in `server'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
from /var/lib/gems/1.9.1/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
from /usr/local/bin/rackup:19:in `load'
Sunglasses answered 13/2, 2013 at 4:25 Comment(2)
Have you already installed thin (using gem install thin, or via bundler and the Gemfile)?Toil
Ran into same issue rack only supports thin and not puma?Consumptive
T
13

Have you already installed thin?

You can install a gem using the gem command: gem install thin

Or alternatively use Bundler, add thin to the Gemfile then run bundle install (of course you will need the bundler gem for this)

Toil answered 13/2, 2013 at 14:43 Comment(1)
This answer should have been accepted; seems to have solved the problem.Wellman
M
2

Had same problem: Here is how you fix it. Go into your current rails directory type the following: 1. sudo gem install faye, 2. sudo gem install thin.

The chances are you didn't install it local to your new rails project.

Marthena answered 12/1, 2016 at 17:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.