ruby-on-rails – bundle exec rake assets:预编译 – 数据库配
发布时间:2020-12-16 20:54:40 所属栏目:百科 来源:网络整理
导读:24小时后,我试图找到我的应用程序的问题.我终于找到了问题. 我跑了 rake assets:precompile RAILS_ENV=production 我一直在收到这个错误. /Users/vezu/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /Users/vezu/.rvm/gems/ruby-1.9.3-p194@global/bin/rake assets:
24小时后,我试图找到我的应用程序的问题.我终于找到了问题.
我跑了 rake assets:precompile RAILS_ENV=production 我一直在收到这个错误. /Users/vezu/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /Users/vezu/.rvm/gems/ruby-1.9.3-p194@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets rake aborted! database configuration does not specify adapter Tasks: TOP => environment (See full trace by running task with --trace) rake aborted! Command failed with status (1): [/Users/vezu/.rvm/rubies/ruby-1.9.3-p194/bi...] 我的database.yml文件看起来像这样 development: adapter: postgresql host: localhost encoding: unicode database: ndoda_development pool: 5 username: password: test: adapter: postgresql encoding: unicode database: ndoda_test pool: 5 解决方法
简单的解决方案是在我的application.rb中添加一个简单的行
config.assets.initialize_on_precompile = false 一切正常. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |