hard crash when rvm gem not available and attempting to create rvm gemset and .rvmrc
Just got this crash. I'll fork the repo and try to work around it (not raise an exception - just log the issue and move on). Note that I have the rvm application installed but the gem is not currently available.
...
extras Create a project-specific rvm gemset and .rvmrc? (y/n) y
extras Create a GitHub repository? (y/n) y
extras recipe banning spiders by modifying 'public/robots.txt'
extras recipe creating project-specific rvm gemset and .rvmrc
https://raw.github.com/RailsApps/rails-composer/master/composer.rb:1663:in rescue in apply': RVM gem is currently unavailable. (RuntimeError) from https://raw.github.com/RailsApps/rails-composer/master/composer.rb:1657:inapply'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/actions.rb:217:in instance_eval' from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/actions.rb:217:inapply'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/railties-3.2.8/lib/rails/generators/app_base.rb:109:in apply_rails_template' from (eval):1:inapply_rails_template'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/task.rb:22:in run' from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/invocation.rb:118:ininvoke_task'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/invocation.rb:124:in block in invoke_all' from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/invocation.rb:124:ineach'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/invocation.rb:124:in map' from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/invocation.rb:124:ininvoke_all'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/group.rb:226:in dispatch' from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/thor-0.14.6/lib/thor/base.rb:389:instart'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/railties-3.2.8/lib/rails/commands/application.rb:38:in <top (required)>' from /Users/jbaylor/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:inrequire'
from /Users/jbaylor/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in require' from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/railties-3.2.8/lib/rails/cli.rb:15:in<top (required)>'
from /Users/jbaylor/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in require' from /Users/jbaylor/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:inrequire'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/gems/railties-3.2.8/bin/rails:7:in <top (required)>' from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/bin/rails:19:inload'
from /Users/jbaylor/.rvm/gems/ruby-1.9.2-p290@jbaylor_personal/bin/rails:19:in `
why not just say no to "Create a project-specific rvm gemset and .rvmrc"? Rather than forking the repo.
Or, first, try installing the rvm gem. It should be there in your global gemset rvm gemset use global.
What's your rvm version?
Let me know how it goes.
Actually, I have no idea why rvm wasn't available just then - it should have been. I'll look into it - seems to be clearly a configuration issue on my end.
However, it should be possible to handle it more gracefully. If I find a way I'll send a pull request to see if you want to merge it in.
Looks like you're using Ruby 1.9.2. You may need 1.9.3 with Rails Composer.
I'd be happy to consider a pull request if you work it out. Thanks!
Getting this error when running Rails Composer with Ruby 2.2.3 and Rails 4.2.5.
See https://github.com/rvm/rvm-gem/issues/16