Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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'
like image 456
Deep Nishad Avatar asked Feb 13 '13 04:02

Deep Nishad


2 Answers

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)

like image 68
SztupY Avatar answered Nov 10 '22 00:11

SztupY


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.

like image 42
FlyingV Avatar answered Nov 10 '22 00:11

FlyingV