2013-08-24 66 views
1

我想使用雅虎音樂寶石,但由於主動支持寶石而出現錯誤。雅虎音樂寶石不起作用

我的代碼

require 'yahoo-music' 

EDIT 1:

Eroor 

LoadError: cannot load such file -- activesupport 
    from /Users/Ashok/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require' 
    from /Users/Ashok/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require' 
    from /Users/Ashok/.rvm/gems/ruby-2.0.0-p247/gems/yahoo-music-0.1.0/lib/yahoo-music.rb:1:in `block in <top (required)>' 
    from /Users/Ashok/.rvm/gems/ruby-2.0.0-p247/gems/yahoo-music-0.1.0/lib/yahoo-music.rb:1:in `each' 
    from /Users/Ashok/.rvm/gems/ruby-2.0.0-p247/gems/yahoo-music-0.1.0/lib/yahoo-music.rb:1:in `<top (required)>' 
    from /Users/Ashok/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:116:in `require' 
    from /Users/Ashok/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:116:in `rescue in require' 
    from /Users/Ashok/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:122:in `require' 
    from (irb):1 
    from /Users/Ashok/.rvm/rubies/ruby-2.0.0-p247/bin/irb:16:in `<main>' 

回答

0

不能加載這樣的文件 - 的ActiveSupport(LoadError)

https://github.com/mattt/yahoo-music

Additionally, yahoo-music has the following gem dependencies: 

* Hpricot >= 0.6 
* ActiveSupport >= 2.1.0 
* FlexMock >= 0.8.2 

......這意味着你必須安裝這些寶石。即使這樣你可能不得不使用紅寶石1.8.7。

+0

不工作,我試了一下。 – TLE

+0

'不工作'是什麼意思? – 7stud

+0

它給錯誤。 – TLE

-1

嘗試了這一點

gem install activesupport