新手问题 rails 4.2.0.rc1 进行 rake db:create 出错

zyjisdog · 2014年12月12日 · 最后由 zyjisdog 回复于 2014年12月13日 · 2114 次阅读

我是新建的 app:rails new myapp -d postgresql 然后把 database.yml 里 production:username:改成了自己的用户名; 最后 rake db:create,报错: rake aborted! LoadError: cannot load such file -- rails-html-sanitizer /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/sanitize_helper.rb:3:in require' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/sanitize_helper.rb:3:in' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/text_helper.rb:32:in <module:TextHelper>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/text_helper.rb:29:inmodule:Helpers' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/text_helper.rb:6:in <module:ActionView>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/text_helper.rb:4:in' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/form_tag_helper.rb:18:in <module:FormTagHelper>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/form_tag_helper.rb:14:inmodule:Helpers' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/form_tag_helper.rb:8:in <module:ActionView>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/form_tag_helper.rb:6:in' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/form_helper.rb:4:in require' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers/form_helper.rb:4:in' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers.rb:50:in <module:Helpers>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers.rb:4:inmodule:ActionView' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/actionview-4.2.0.rc1/lib/action_view/helpers.rb:3:in <top (required)>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/legacy_asset_tag_helper.rb:7:inmodule:LegacyAssetTagHelper' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/legacy_asset_tag_helper.rb:6:in <module:Rails>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/legacy_asset_tag_helper.rb:4:inmodule:Sprockets' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/legacy_asset_tag_helper.rb:3:in <top (required)>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/helper.rb:45:inrequire' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/helper.rb:45:in <module:Helper>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/helper.rb:7:inmodule:Rails' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/helper.rb:6:in <module:Sprockets>' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/rails/helper.rb:5:in' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/railtie.rb:6:in require' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sprockets-rails-2.2.2/lib/sprockets/railtie.rb:6:in' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sass-rails-4.0.5/lib/sass/rails/railtie.rb:1:in require' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sass-rails-4.0.5/lib/sass/rails/railtie.rb:1:in' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sass-rails-4.0.5/lib/sass/rails.rb:11:in require' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sass-rails-4.0.5/lib/sass/rails.rb:11:in' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sass-rails-4.0.5/lib/sass-rails.rb:1:in require' /Users/CloudL/.rvm/gems/ruby-2.1.5/gems/sass-rails-4.0.5/lib/sass-rails.rb:1:in' /Users/CloudL/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.9/lib/bundler/runtime.rb:76:in require' /Users/CloudL/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.9/lib/bundler/runtime.rb:76:inblock (2 levels) in require' /Users/CloudL/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.9/lib/bundler/runtime.rb:72:in each' /Users/CloudL/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.9/lib/bundler/runtime.rb:72:inblock in require' /Users/CloudL/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.9/lib/bundler/runtime.rb:61:in each' /Users/CloudL/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.9/lib/bundler/runtime.rb:61:inrequire' /Users/CloudL/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.9/lib/bundler.rb:134:in require' /Users/CloudL/Documents/RailsProj/myapp/config/application.rb:7:in' /Users/CloudL/Documents/RailsProj/myapp/Rakefile:4:in `' (See full trace by running task with --trace)

请问这是怎么回事....谢谢大家了:)

先升到4.2.0.rc3看看解决没?

#1 楼 @ericguo 后来不知怎么的就自己解决了,大概是执行了 updat 之类的命令.....还是谢谢你了:)

zyjisdog 关闭了讨论。 04月21日 16:45
需要 登录 后方可回复, 如果你还没有账号请 注册新账号