Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/52.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Rails-无法在生产环境中预编译资产_Ruby On Rails_Ruby_Amazon Ec2_Assets - Fatal编程技术网

Ruby on rails Rails-无法在生产环境中预编译资产

Ruby on rails Rails-无法在生产环境中预编译资产,ruby-on-rails,ruby,amazon-ec2,assets,Ruby On Rails,Ruby,Amazon Ec2,Assets,我在AmazonEC2上部署了一个Rails应用程序,但在部署的过程中 find: `/path/to/root/releases/20130514204835/public/stylesheets' (the same for javascripts and images) 然后我尝试在我的机器上预编译资源-rake资产:预编译RAILS\u ENV=production或bundle exec rake资产:预编译RAILS\u ENV=production-但在这两种情况下我都得到了相同

我在AmazonEC2上部署了一个Rails应用程序,但在部署的过程中

find: `/path/to/root/releases/20130514204835/public/stylesheets' (the same for javascripts and images)
然后我尝试在我的机器上预编译资源-rake资产:预编译RAILS\u ENV=productionbundle exec rake资产:预编译RAILS\u ENV=production-但在这两种情况下我都得到了相同的错误:

/Users/adam/.rvm/rubies/ruby-1.9.3-p385/bin/ruby /Users/radek/.rvm/gems/ruby-1.9.3-p385/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Access denied for user 'adam'@'localhost' (using password: YES)

对MySQL的访问应该是正常的,资产有什么问题吗?

您的web服务器可以访问这些文件吗?我如何才能找到它?如果您的MySQL正常工作,MySQL用户可以访问您的rails应用程序。找出您的web服务器以哪个用户的身份运行,如果是apache,有时是apache2或httpd,然后键入groups以查看您的web服务器所属的组。查看MySQL可以访问哪些组,如果缺少该组,请将webserver用户添加到该组中,这样MySQL就可以访问rails应用程序,从而可以提供这些资产。