我在生成秘密令牌时遇到问题。
我正在尝试这个:
[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
阻止了要求' /usr/local/rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:inload_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:inblock 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:inload' /redmine/plugins/easyproject/lib/tasks/easyproject.rake:1:in
阻止&#39; /redmine/plugins/easyproject/lib/tasks/easyproject.rake:1:ineach' /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:inload' /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:inload_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:inblock 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:inblock 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:ineach' /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:inload_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)
任何人都可以提供帮助吗?
答案 0 :(得分:1)
正在寻找rspec
。但是你没有在你的Gemfile中拥有它,这就是rake
无法找到它的原因(也不是捆绑器)。它似乎已安装,因此只需将其添加到您的Gemfile
,然后bundle
即可,您应该已全部设置。
由于它看起来像一个rails项目,因此添加该项目然后运行bundle
应该是您需要的全部设置。
group :development, :test do
gem 'rspec-rails', '~> 3.0'
end
Rails仅使用套装中指定的宝石。