2012-03-05 20 views
9

Sto utilizzando Ruby 1.9.3 e rails 3.2.2. Ogni volta che utilizzo il thin server con private_pub gem non funziona, ho fatto rackup private_pub.ru -s thin -E production. Ottengo il seguente erroreL'avvio di thin server senza la gemma sottile non funziona

/home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler/thin.rb:1:in `require': cannot load such file -- thin (LoadError) 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler/thin.rb:1:in `<top (required)>' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `const_get' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `block in get' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `each' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `inject' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `get' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:269:in `server' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:265:in `start' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:137:in `start' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/bin/rackup:4:in `<top (required)>' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/bin/rackup:19:in `load' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/bin/rackup:19:in `<main>' 
[email protected]:~/paper$ rvm 1.9.3 
[email protected]:~/paper$ rackup private_pub.ru -s thin -E production 
/home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler/thin.rb:1:in `require': cannot load such file -- thin (LoadError) 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler/thin.rb:1:in `<top (required)>' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `const_get' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `block in get' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `each' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `inject' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler.rb:20:in `get' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:269:in `server' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:265:in `start' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:137:in `start' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/bin/rackup:4:in `<top (required)>' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/bin/rackup:19:in `load' 
    from /home/rzaartz/.rvm/gems/ruby-1.9.3-p125/bin/rackup:19:in `<main>' 

ma includo la gemma sottile nel mio gioiello di file che avrebbe funzionato bene. Qualsiasi aiuto grazie.

risposta

21

Non è possibile avviare linux senza linux.

Non è possibile avviare un server rackup senza rack.

Non puoi lanciare magro senza gemma sottile.

+1

ho controllato un tutorial da Ryan Bates e nel suo codice sorgente non ha incluso la gemma sottile – Uchenna

+0

ma aveva sottile installare su questo repository gioiello – shingara

+0

ho anche installato – Uchenna

1

Se si desidera utilizzare una gemma, deve essere nel proprio Gemfile. È possibile risolvere il problema come segue:

  • Aggiungere la seguente riga al vostro Gemfile: Aggiornamento gem 'thin'
  • vostro attuale ambiente di app: bundle install
  • Avviare il server web: bundle exec thin start
+0

Intendevi gemma? :) – AMIT

+0

Sicuro. Grazie! –

14
/home/dimas/RUBY/application/faye-tutorial/faye.ru:3:in `require': cannot load such file -- thin (LoadError) 
    from /home/dimas/RUBY/application/faye-tutorial/faye.ru:3:in `block in <main>' 

Ho lo stesso problema. fissarlo con:

aggiungere questo gioiello a Gemfile

gem 'faye' 
gem 'thin' 

poi bundle install.

+2

Molti di coloro che lo trovano utilizzano probabilmente Rails 4/Ruby 2 e seguono il railscast # 260 di Ryan Bate su Faye. '$ rackup faye.ru -s thin -E produzione' Non ha' faye' o 'thin' nel file gem. Nonostante eseguiamo un 'gem install' su entrambi i file' faye' e 'thin', @meno per Rails 4,' faye' e 'thin' devono essere nel file gem e un' bundle install' eseguito prima dell'avvio del server. –

+0

grazie .. la correzione è funzionante per me .. –

Problemi correlati