kandanapp / kandan

Kandan is an Open Source Alternative to HipChat
GNU Affero General Public License v3.0
2.72k stars 408 forks source link

Specify ruby version 1.9.3 in Gemfile #356

Closed pimpin closed 10 years ago

pimpin commented 10 years ago

As ruby 1.9 is required for kandan. Specifying it in Gemfile is requiered for Heroku deployment since ruby 2 is default.

scouttyg commented 10 years ago

This would actually break a decent amount of things, because if someone is using a .ruby-version file, we don't want to override their settings (I use ruby 2.0.0-p247 for example) with the hardcoded 1.9.3 version.

We'd hate for someone to think their app is launching with ruby 2.0 based on their .ruby-version file when it will really launch at 1.9.3.

It might be better to have a .ruby-version.sample file with it specified in there, and then change maybe the README to talk about setting the ruby version correctly.

pimpin commented 10 years ago

Your right, it's not great to hard code the ruby version inside Gemfile for env using a .ruby-version file. Heroku do not support this file and do not plan to support it as said in this closed but unsolved issue. TravisCI had the same kind of issue and suggest to add a rescue nil in the Gemfile (ruby "1.9.3" rescue nil)... Would it be ok ?

scouttyg commented 10 years ago

Hmmm.. It's tough, because I can see both sides.

On the one hand, I think Kandan's requirements are actally >= 1.9.3, not just 1.9.3 -- I'm running 2.0-p247 for example and everything seems to run great. If we don't change anything, and it launches to Heroku, there really won't be an issue (in fact, we may get some of the speed benefits of 2.0 or 2.1 over 1.9). But if you are working on 1.9.3 in your .ruby-version file and you launch to Heroku, you might be surprised to see 2.0 as the default ruby.

On a similar note, if you mark it in the Gemfile, the opposite could be true -- you might be surprised when it launches to Heroku on 1.9.3 when your ruby-version says 2.0.

So no matter what we do, there's going to be expectations that might not reflect the actual situation going on.

The biggest concerns I have are -- do we actually lose something by marking it specifically in the Gemfile for Heroku? In my opinion, yes -- if it works on Ruby 2.0 and we set it to 1.9.3, we lose the speed improvements possibly.

My thoughts are -- it might just make more sense to update the documentation to say that if you want a specific ruby version on Heroku, you'll have to add it to your Gemfile, otherwise it will launch to Heroku as ruby 2.0.

But I'd love to hear other opinions, especially @fusion94 if he has any. I also know @jangosteve (who has committed a few pull requests lately for Kandan) is the maintainer for jquery_ujs and helps out with Rails development, so he might have some thoughts as well.

pimpin commented 10 years ago

On the one hand, I think Kandan's requirements are actally >= 1.9.3, not just 1.9.3 z-- I'm running 2.0-p247 for example and everything seems to run great. If we don't change anything, and it launches to Heroku, there really won't be an issue (in fact, we may get some of the speed benefits of 2.0 or 2.1 over 1.9).

I do not choose 1.9 ruby version, I just try to deploy from scratch to Heroku following the notice. And it failed on launching, and I thought it was because kandan was not ready yet to run on 2.0 or 2.1 (master branch at least). As Ruby 1.9 is a mentioned requirement in the same notice, I try it and it was fixed...

BTW, if 2.0 is now supported, I open a new issue for Heroku deployment.