RVM、Merb、Rake 和 RSpec

发布于 2024-09-13 03:00:38 字数 771 浏览 9 评论 0原文

我当前正在运行通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

糖果控 2024-09-20 03:00:38

我在 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.

影子是时光的心 2024-09-20 03:00:38

两周后我终于想通了!

编辑您的 Gemfile 并添加以下行:

gem "rspec", :require => "spec"

然后您就可以离开了!

After 2 weeks I finally figured it out!

Edit your Gemfile and add the line:

gem "rspec", :require => "spec"

and you're away!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文