Redmine无法生成秘密令牌

时间:2014-12-23 13:17:52

标签: ruby bundle token redmine

我在生成秘密令牌时遇到问题。

我正在尝试这个:

  

[redmine]#rake generate_secret_token rake aborted! LoadError:不能   加载这样的文件 - rspec / core   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in   require' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in 阻止了要求&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in   load_dependency' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in 需要&#39;   /redmine/plugins/easyproject/easy_plugins/easy_extensions/lib/tasks/tests.rake:3:in   <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in 负载&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in   block in load' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in load_dependency&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in   load' /redmine/plugins/easyproject/lib/tasks/easyproject.rake:1:in 阻止&#39;   /redmine/plugins/easyproject/lib/tasks/easyproject.rake:1:in   each' /redmine/plugins/easyproject/lib/tasks/easyproject.rake:1:in &#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in   load' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in 阻止加载&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in   load_dependency' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in 负载&#39; /redmine/lib/tasks/redmine.rake:179:in block in <top (required)>' /redmine/lib/tasks/redmine.rake:179:in每个&#39;   /redmine/lib/tasks/redmine.rake:179:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in loading&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in   block in load' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in load_dependency&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in   load_tasks中的load' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.19/lib/rails/engine.rb:425:in 阻止&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.19/lib/rails/engine.rb:425:in   each' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.19/lib/rails/engine.rb:425:in load_tasks&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.19/lib/rails/application.rb:145:in   load_tasks' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in 的method_missing&#39; / redmine / Rakefile:7:<top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in eval&#39;   /usr/local/rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in   `&#39; (通过使用--trace运行任务查看完整跟踪)

添加之前&#34;捆绑执行&#34;错误是一样的。

宝石清单:

> [redmine]# gem list | grep rspec 
rspec (3.1.0) 
rspec-core (3.1.7)
>rspec-expectations (3.1.2) 
rspec-mocks (3.1.3) 
rspec-support (3.1.2)
> [redmine]# gem list | grep core 
core (0.0.6) 
rspec-core (3.1.7)

任何人都可以提供帮助吗?

1 个答案:

答案 0 :(得分:1)

正在寻找rspec。但是你没有在你的Gemfile中拥有它,这就是rake无法找到它的原因(也不是捆绑器)。它似乎已安装,因此只需将其添加到您的Gemfile,然后bundle即可,您应该已全部设置。

由于它看起来像一个rails项目,因此添加该项目然后运行bundle应该是您需要的全部设置。

group :development, :test do
  gem 'rspec-rails', '~> 3.0'
end

Rails仅使用套装中指定的宝石。