2011-01-23 9 views
0

Railsからロードされたときにうまく動作するベンダー/ gemsに宝石を解凍しました(youtube_g)。ベンダー/ gemにあるバックグラウンドプロセス/コンソールからgemを要求する方法

私はdelayed_jobを実行したときに

require 'youtube_g' 

を呼び出すことで、この宝石を使用する必要がありますが、私はこのエラーを取得する::

MissingSourceFile: no such file to load -- youtube_g 
    from /Users/t/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:182:in `require' 
    from /Users/t/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:182:in `block in require' 
    from /Users/t/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:547:in `new_constants_in' 
    from /Users/t/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:182:in `require' 
    from (irb):2 
    from /Users/t/.rvm/rubies/ruby-1.9.1-p378/bin/irb:16:in `<main>' 

私はそれを修正することができますどのように任意のアイデア?

+1

は、それはあなたのgemfileにありますか? – apneadiving

答えて

0

Railsは、gemfileで宣言されていなくてもgemが動作できるように、パスを自動ロードすることができます。

しかし、バックグラウンドタスクは、この知恵を持っていないAY、あなたのgemfileでこれを追加しよう:

​​
関連する問題