Reputation: 91
I developed a Rails app on my Macbook and I'm now looking to host it on Openshift's (free) option. But, I'm wondering if it will work?
My app has the following specs:
Rails 4.2.5, Ruby 2.2.3, Postgres 9.4.5. It creates user directories and writes text files which are publicly accessible. i.e www.my_app.com\user_dir\file1.txt etc..
It appears Openshift only has earlier versions of Ruby, Rails, Postgres available. But can I safely downgrade Ruby, Rails and Postgress to make it work? Do I really need to? If so, how?
Thanks for your help.
Upvotes: 0
Views: 232
Reputation: 91
I'd be interested in hearing from the person who voted down my original question...
Do you not think many people face the same issues -- when it is natural to use/download the latest versions of ruby/rails etc while developing on a local machine?
So, why the vote down?
Upvotes: 0
Reputation:
According to this page (https://rubygems.org/gems/rails/versions/4.2.5), a Ruby version of 1.9.3 or higher is required for rails 4.2.5. If you git push to OpenShift Online it will install rails 4.2.5 and it's dependent gems without issue (I have just tested this).
As for Ruby 2.2, you would need to downgrade to Ruby 2.0 and test your site using rvm. It should be trivial to do this using RVM, and if it doesn't work you can just rvm use 2.2 and everything should be fine again.
Whether this works or not really hinges on what features of Ruby 2.2.3 and PostgreSQL 9.4.5 that you are using that are NOT available in earlier versions. It's quite possible that you are not using any of the newest features and everything would work just fine, but you are really the only one that knows that for sure.
It should be pretty easy to fire up a small gear on OpenShift and do a "git push" and see if it works or not. If it doesn't, you should begin to see some errors in the log files or on the deploy log that would tell you what you would need to change/fix for it to work correctly.
Upvotes: 1