【问题标题】:RVM, Merb, Rake and RSpecRVM、Merb、Rake 和 RSpec
【发布时间】:2010-08-09 08:32:20
【问题描述】:

我目前正在运行通过 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(我现在已经完成了)。

有什么我可以开始的想法吗?

干杯, 山姆

【问题讨论】:

    标签: ruby rspec rake merb rvm


    【解决方案1】:

    我在 Rails 2.3.5 上遇到了同样的问题。我最终不得不卸载 RSpec 2.0 并安装 RSpec 1.3.0。

    【讨论】:

      【解决方案2】:

      2 周后我终于弄明白了!

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

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

      你走了!

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-07-21
        • 1970-01-01
        • 2011-10-06
        • 1970-01-01
        • 1970-01-01
        • 2012-04-20
        • 1970-01-01
        • 2012-10-16
        相关资源
        最近更新 更多