这发生在我尝试过的每个项目中:如果我使用终端并说 bundle install 或 rake db:migrate ,它工作正常,可以看到我的网站,工作完全正常。
但是,如果我在 RubyMine 中打开项目并想要执行相同的任务,它会给我带来各种错误或错误。我只是复制粘贴其中一些作为示例。
我确信应该在某处设置一些小项目设置。但不知道什么和在哪里
注意:始终在 Rails 1.8 上设置“编辑配置”,尽管我将其更改为 Rails 1.9 ,但仍然没有区别。
我在 Mac 上运行最新版本的 RubyMine。
/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /usr/bin/rake db:migrate
/Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/spec_set.rb:90:in `materialize': Could not find i18n-0.6.1 in any of the sources (Bundler::GemNotFound)
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/spec_set.rb:83:in `map!'
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/spec_set.rb:83:in `materialize'
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/definition.rb:113:in `specs'
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/definition.rb:158:in `specs_for'
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/definition.rb:147:in `requested_specs'
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/environment.rb:23:in `requested_specs'
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:11:in `setup'
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler.rb:116:in `setup'
from /Users/JonyIve/.gem/ruby/1.8/gems/bundler-1.2.3/lib/bundler/setup.rb:17
编辑:从 IDE 运行 bundler 安装后:
/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/JonyIve/.gem/ruby/1.8/bin/bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
sudo: no tty present and no askpass program specified
Gem::Exception: Cannot load gem at [/Library/Ruby/Gems/1.8/cache/rake-10.0.3.gem] in /Users/JonyIve/Downloads/code-1/rails32/depot_c
An error occurred while installing rake (10.0.3), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.3'` succeeds before bundling.