简体   繁体   English

如何在使用不同版本的rails的rails应用程序上运行ruby?

[英]How to run ruby on rails apps with different versions of rails?

I have about 3 apps on a Windows Server 2012 and all of them are different versions of rails. 我在Windows Server 2012上有大约3个应用程序,它们都是不同版本的rails。 So far, I can run locally the app with the latest version of rails, but not the other two, which were deployed from Heroku. 到目前为止,我可以使用最新版本的rails在本地运行应用程序,而不是从Heroku部署的其他两个版本。 I wanted to make changes locally before I push them to Heroku but no luck. 我想在将它们推送到Heroku之前在本地进行更改,但没有运气。 Is there any reference to that or is this even possible? 有没有提及或甚至可能? thanks a lot! 非常感谢!

Your problem is that you are trying to use sqlite with Heroku. 您的问题是您正在尝试将sqlite与Heroku一起使用。 Heroku requires using 'postgres' as the database Heroku需要使用'postgres'作为数据库

change the gemfile to the following 将gemfile更改为以下内容

group :development do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end

And then change your database.yml file to this 然后将您的database.yml文件更改为此

adapter: postgresql

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM