我是(完全)新的ROR,並且有一個應用程序來維護和升級。我有源代碼,正在嘗試使用db:migrate
rake命令構建數據庫。我已經開始使用Aptana Studio進行開發。當我運行dg:migrate
我收到以下錯誤:配置和運行Ruby-On-Rails遷移
rake db:migrate
(in G:/Projects/.../.../trunk)
MissingSourceFile no such file to load -- rcov/rcovtask
WARNING: rcov tests won't work
Looking for release_type overrides ...
=> Loading G:/Projects/.../.../trunk/config/release_type_config.rb
DEPRECATION WARNING: ActiveRecord::Base.allow_concurrency=has been deprecated and
no longer has any effect. Please remove all references to allow_concurrency=..
(called from allow_concurrency= at D:/Ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/abstract/
connection_specification.rb:98)
DEPRECATION WARNING: ActiveRecord::Base.verification_timeout= has been deprecated
and no longer has any effect. Please remove all references to
verification_timeout=.. (called from verification_timeout= at
D:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
connection_adapters/abstract/connection_specification.rb:108)
rake aborted!
no such file to load -- hpricot
我已經安裝角度來說,Hpricot寶石也(0.8版本)。
這是什麼補救措施?
@simone i' m運行'gem install hpricot'時出現此錯誤 - >'構建本機擴展。這可能需要一段時間... 錯誤:安裝hpricot時出錯: 錯誤:無法構建gem本機擴展。 ruby.exe extconf.rb 檢查stdio.h中...是 創建的Makefile 使 的mingw32-的make.exe 的mingw32-的make.exe:***沒有規則,使目標'ruby.h」,需要通過'fast_xs.o'。 S 頂部。 Gem文件將繼續安裝在D:/Ruby/lib/ruby/gems/1.8/gems/hpricot-0.8.2 中進行檢查。 記錄到D的結果:/Ruby/lib/ruby/gems/1.8/gems/hpricot-0.8.2/ext/fast_xs/gem_m ake.out' – TheVillageIdiot 2010-02-09 08:33:56
這是因爲您的計算機上沒有編譯器。你需要安裝一個編譯好的Gem。嘗試指定您的環境'gem install hpricot --platform x86-mingw32' – 2010-02-09 08:57:18
沒有運氣@simone得到相同的錯誤。我已經安裝了MinGW32,所以我有gcc等。如果需要其他任何東西,請讓我知道,或者如果我可以從某處獲得編譯好的寶石。 – TheVillageIdiot 2010-02-09 09:17:30