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
5 comments
Comment actions Permalink

Hi,

is spring in your Gemfile?

Regards, Oleg.

0
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/config
---
BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'


Gemfile

source 'https://rubygems.org'


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: https://github.com/rails/spring
  gem 'spring'
end

0
Comment actions Permalink

Hi,

sorry for delayed response.  It looks like a bug for me, could you please file one in our tracker (https://youtrack.jetbrains.com/issues/RUBY)

Thanks in advance, Oleg.

0

Please sign in to leave a comment.