RVM、Merb、Rake 和 RSpec
我当前正在运行通过 RVM 安装的 ruby-1.9.1。我一直在考虑使用 Merb,但是当我尝试运行它时,我收到此错误:
sam@shiny-dev:~/Projects/mojo$ rake db:migrate
(in /home/sam/Projects/mojo)
Merb root at: /home/sam/Projects/mojo
/home/sam/.rvm/gems/ruby-1.9.1-p378@merb/gems/dm-validations-1.0.0/lib/dm-validations.rb:33: warning: already initialized constant OrderedHash
Loading init file from ./config/init.rb
Loading ./config/environments/development.rb
rake aborted!
no such file to load -- spec/rake/spectask
/home/sam/Projects/mojo/Rakefile:24:in `require'
(See full trace by running task with --trace)
我已经安装了 rspec,但即使在 IRB 中,我也不能要求“spec/rake/spectask”,除非我还安装了 rspec-rails(我已经安装了 rspec-rails)现在完成了)。
我有什么可以开始的想法吗?
干杯, 山姆
I am currently running ruby-1.9.1 installed via RVM. I have been looking at using Merb, but when I try and run it I get this error:
sam@shiny-dev:~/Projects/mojo$ rake db:migrate
(in /home/sam/Projects/mojo)
Merb root at: /home/sam/Projects/mojo
/home/sam/.rvm/gems/ruby-1.9.1-p378@merb/gems/dm-validations-1.0.0/lib/dm-validations.rb:33: warning: already initialized constant OrderedHash
Loading init file from ./config/init.rb
Loading ./config/environments/development.rb
rake aborted!
no such file to load -- spec/rake/spectask
/home/sam/Projects/mojo/Rakefile:24:in `require'
(See full trace by running task with --trace)
I have installed rspec, but even in IRB I cannot require 'spec/rake/spectask' unless I also install rspec-rails (which I have now done).
Any ideas where I could even start?
Cheers,
Sam
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在 Rails 2.3.5 上也遇到了同样的问题。我最终不得不卸载 RSpec 2.0 并安装 RSpec 1.3.0。
I had the same problem with this on Rails 2.3.5. I ended up having to uninstall RSpec 2.0 and install RSpec 1.3.0 instead.
两周后我终于想通了!
编辑您的 Gemfile 并添加以下行:
然后您就可以离开了!
After 2 weeks I finally figured it out!
Edit your Gemfile and add the line:
and you're away!