How do I run "bin/spring rails generate" ?

env:   OS: Yosemite,  RubyMine: 7.1.4,  Ruby: 2.2.2 (rbenv),  Rails 4.2.3

I got the following error message when I used "Tools -> Run Rails Generator.. "

/Users/iwanaga/.rbenv/versions/2.2.2/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/iwanaga/projects/work/dos/dos/vendor/bundle/ruby/2.2.0/bin/spring rails generate devise:install -s
/Users/iwanaga/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'spring' (>= 0) among 49 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/iwanaga/.gem/ruby/2.2.0:/Users/iwanaga/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0', execute `gem env` for more information
    from /Users/iwanaga/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
    from /Users/iwanaga/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
    from /Users/iwanaga/projects/work/dos/dos/vendor/bundle/ruby/2.2.0/bin/spring:22:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'



Process finished with exit code 1

It works like following if I use "Terminal", but I want to use "Tools -> Run Rails Generator..".

MacBook-Air% bin/spring rails generate devise:install
      create  config/initializers/devise.rb
      create  config/locales/devise.en.yml
Comment actions Permalink


is spring in your Gemfile?

Regards, Oleg.

Comment actions Permalink

Yes, it is in Gemfile.

( "spring" is not  installed in shared gems, because I have some rails projects and I don't want to share gems with other projects)

BUNDLE_PATH: vendor/bundle


source ''

gem 'rails', '4.2.3'
gem 'mysql2'
gem 'activerecord-session_store'

# css/js
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc

# smartphone
gem 'jpmobile'

# Pagination
gem 'kaminari'
gem 'ransack'

# Authentication
gem 'devise'
gem 'omniauth-google-oauth2'

# Deploy
gem 'unicorn'
gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
  # Spring speeds up development by keeping your application running in the background. Read more:
  gem 'spring'

Comment actions Permalink


sorry for delayed response.  It looks like a bug for me, could you please file one in our tracker (

Thanks in advance, Oleg.


Please sign in to leave a comment.