如果有人能告诉我如何继续这样做会非常有帮助。我按照以下链接中的步骤来部署此链接中提到的应用程序。 http://installfest.railsbridge.org/installfest/deploy_a_rails_app
但是,部署失败并显示错误消息:
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NameError: undefined local variable or method `hRails' for main:Object
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to desolate-peak-2535.
remote:
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/desolate-peak-2535.git'
这是服务器日志:
015-08-20T07:54:20.729142+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
015-08-20T08:21:44.563972+00:00 heroku[slug-compiler]: Slug compilation started
015-08-20T08:21:44.563994+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
015-08-20T08:26:26.742224+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
015-08-20T08:26:26.742136+00:00 heroku[slug-compiler]: Slug compilation started
答案 0 :(得分:0)
您应该可以通过运行rake assets:precompile
在本地重现此内容。错误日志的第3行。然后错误清楚地说明这个失败了,它说:Precompiling assets failed.
最后,你正在使用找不到的变量hRails
。可能是一个错字,你的意思是Rails
。在您的项目中搜索hRails
,这将是错误的位置。