2010-02-09 231 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