简体   繁体   中英

ruby rvm rails generate scaffold fails

I have this following Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.1'

group :assets do
    gem 'sass-rails', '~> 3.2.3'
    gem 'coffee-rails', '~> 3.2.1'
    gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

Running rvm version:

$ rvm --version

rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]

The generate scaffold fails with:

$ rvm all do rails generate scaffold User name:string email:string
(in /home/user/.rvm/gems/ruby-1.9.3-p0/gems/rails-0.9.5)
WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
rake/gempackagetask is deprecated.  Use rubygems/package_task instead

rm -rf /tmp/demo_app/generate
rake aborted!
can't convert nil into String

Tasks: TOP => fresh_gem_rails => make_dir_structure => make_base_dirs
(See full trace by running task with --trace)

(One thing to mention that there is no Rakefile in the directory).

What does can't convert nil into String mean? (I tried to place --trace into various places onto the command line, but the messages didn't seem to change ...)

Also how do I correct the RDoc warning?

Thanks

That rails-0.9.5 in /home/user/.rvm/gems/ruby-1.9.3-p0/gems/rails-0.9.5 sounds suspicious to me.

Are you sure your Rails installation isn't screwed up?

EDIT

And what's that rvm all for, anyway? I'm not an rvm guru, but from what I could gather it looks like it does something for all installed rubies, which most certainly isn't what you want here.

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