2010-02-09 145 views
1

我是(完全)新的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版本)。

這是什麼補救措施?

回答

1

最有效位誤差

rake aborted! 
no such file to load -- hpricot 

你需要角度來說,Hpricot。您可以安裝它的命令行中運行以下命令

gem install hpricot 
+0

@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

+0

這是因爲您的計算機上沒有編譯器。你需要安裝一個編譯好的Gem。嘗試指定您的環境'gem install hpricot --platform x86-mingw32' – 2010-02-09 08:57:18

+0

沒有運氣@simone得到相同的錯誤。我已經安裝了MinGW32,所以我有gcc等。如果需要其他任何東西,請讓我知道,或者如果我可以從某處獲得編譯好的寶石。 – TheVillageIdiot 2010-02-09 09:17:30

1

也許你的系統找不到寶石。這可能是路徑問題,請參閱this post for details

+0

@JRL我已經正確配置中的Aptana設置的路徑和所有的目錄在%PATH%ENV註冊。變量 – TheVillageIdiot 2010-02-09 07:07:26

3

安裝rcov寶石:

gem install relevance-rcov --source http://gems.github.com 
+0

執行停止在hpricot。 rcov要求只是產生了一個警告。 – 2010-02-09 08:11:58

+0

@neutrino我檢查過並沒有安裝hpricot,因爲gcc不可用。我已經安裝了MinGW32和mingw32-make。我嘗試使用你提供的命令安裝rcov,並得到這個錯誤:'mingw32-make.exe:***沒有規則使目標'ruby.h',需要'callsite.o'。' – TheVillageIdiot 2010-02-09 08:30:29