简体   繁体   中英

Rails project not running in Rubymine

When I start my Rails project in Rubymine and run it with the green button, I get this error message:

/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/Josh/RubymineProjects/untitled/bin/rails server -b 0.0.0.0 -p 3000 -e development
/Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/resolver.rb:347:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'sass-rails (~> 5.0) ruby' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/resolver.rb:325:in `each'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/resolver.rb:325:in `verify_gemfile_dependencies_are_found!'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/resolver.rb:198:in `start'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/resolver.rb:182:in `resolve'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:200:in `resolve'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:140:in `specs'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:185:in `specs_for'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:174:in `requested_specs'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/environment.rb:18:in `requested_specs'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:13:in `setup'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler.rb:127:in `setup'
  from /Users/Josh/.gem/ruby/2.0.0/gems/bundler-1.10.6/lib/bundler/setup.rb:18:in `<top (required)>'
  from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
  from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
  from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
  from /Users/Josh/RubymineProjects/untitled/config/boot.rb:3:in `<top (required)>'
  from /Users/Josh/RubymineProjects/untitled/bin/rails:3:in `require_relative'
  from /Users/Josh/RubymineProjects/untitled/bin/rails:3:in `<top (required)>'
  from -e:1:in `load'
  from -e:1:in `<main>'

Process finished with exit code 1

Any idea why this is happening or how it should be fixed? I'm using Rails v4.2, and Ruby v2.0 on a Macbook Pro.

You have to follow a few steps to run projects in RubyMine. Make sure you have:

  1. All gem installed. From RubyMine you can install gems.
  2. The correct Ruby version in the RubyMine project. You can change the Ruby version from "Settings > Ruby version".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM