【发布时间】:2012-05-18 01:50:36
【问题描述】:
我有一个可以在本地正常工作的 Ruby 1.8.7 应用程序。为了在 Heroku 上加载它,我将数据库从 SQLite 更改为 PostgreSQL,安装 PostgreSQL 9.1.3,我更改了 Gemfile,将 gem sqlite3 替换为:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
并将config/database.yml的零件生产更改为:
production:
adapter: postgresql
database: project_production
pool: 5
timeout: 5000
然后我成功运行bundle install --without production。接下来我创建了一个 git 存储库:
git init
git add *
git commit -m "text"
后来我用heroku create --stack bamboo-ree-1.8.7、git push heroku master和heroku rake db:migrate成功创建了一个heroku应用程序。
但它没有用!
缺少什么?是我做错了什么还是没有发表任何声明?
【问题讨论】:
-
"It didn't work" 不是由 Rails、Postges 或 Heroku 创建的错误消息。你可能想要更具体一点。
标签: ruby ruby-on-rails-3 git heroku postgresql-9.1