把Redmine部署到heroku上差点没把我气吐血


好几年没接触ror了,想部署一个Redmine到heroku上用
虽然ror编码方面忘差不多了,但部署方面总更应该不会差太远吧,几年前玩ror2的时候也曾经部署到heroku上过
昨晚折腾到好晚都没能搞定
先是Gemfile这个文件,我不小心写成了GemFile,然后当然就部署失败了,尝试了好久把这个文件重新改名字,重新bundle install和bundle update等操作依然没用,总是报错。
无奈从头开始吧
然后是一堆版本问题,我用的最新的Redmine,只支持ruby 1.8.6, 1.8.7 Rails 2.3.11 Rack 1.1.1
后面两个可以通过Gemfile配置
而heroku默认的ruby版本是1.9.2,不被Redmine支持
采用这条命令进行转换
heroku stack:migrate bamboo-ree-1.8.7
在下一次push的时候生效

一直到迁移数据库这步
heroku rake db:migrate
执行的时候总是报错
Permission denied - /app/public/plugin_assets

求解

heroku redmine ruby-on-rails

☆死妹控☆ 10 years, 6 months ago

Heroku public 文件夹不可以写。

你可以试试以下这个方法。
A common work-around is to copy these assets manually before deploying. This can be done by running your config locally once and checking the copied assets into source control which is then deployed to Heroku.

Notice that public/plugin_assets is included into the default .gitignore, so you need to remove that from there obviously.

囧虚SAMA answered 10 years, 6 months ago

Your Answer