このチュートリアルを使おうとしていますが、スキャフォールド生成コードに問題があります。
application.rb
Bundler.require(:default, Rails.env) if defined?(Bundler)
#if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
# Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
#end
このトピックから解決策を取りますが、この問題にはうまくいきません。
ログ:
C:\Users\Evgeny\Rails_projects\demo_app>rails generate scaffold User name:string
email:string
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/ra
iltie/configuration.rb:77:in `method_missing': undefined method `assets' for #<R
ails::Application::Configuration:0x3a03248> (NoMethodError)
from C:/Users/Evgeny/Rails_projects/demo_app/config/application.rb:55:in
`<class:Application>'
from C:/Users/Evgeny/Rails_projects/demo_app/config/application.rb:14:in
`<module:DemoApp>'
from C:/Users/Evgeny/Rails_projects/demo_app/config/application.rb:13:in
`<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.0.9
/lib/rails/commands.rb:15:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.0.9
/lib/rails/commands.rb:15:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
構成アプリ:
source 'http://rubygems.org'
gem 'rails', '3.0.9'
gem 'sqlite3', '1.3.3'