Ruby and Rails versions
Closed this issue · 20 comments
What's the latest Ruby and Rails versions the program is guaranteed to work?
If you pull the latest from Github, it works with Ruby 2.5.1.
The version of Rails which works comes bundled with the application, so you don't need to concern yourself with that.
Thank you. It does work with Ruby 2.5.1 and Rails 2.3.18 (which is bundled with the application).
Currently running with Ruby 2.6.0.
Unfamiliar with RoR. I may have a versions related issue. Deploying to Heroku -
remote: -----> Using Ruby version: ruby-2.5.3 remote: -----> Installing dependencies using bundler 1.15.2
remote: An error occurred while installing json (1.8.3), and Bundler cannot continue. remote: Make sure that
gem install json -v '1.8.3'succeeds before bundling. remote: remote: In Gemfile: remote: rdoc was resolved to 4.2.2, which depends on remote: json remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed
further up I see errors
remote: current directory: remote: /tmp/build_59a0ab0518d5d55d3943beb61720424d/vendor/bundle/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator remote: make "DESTDIR=" remote: compiling generator.c remote: generator.c: In function ‘generate_json’: remote: generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function); remote: did you mean ‘mFixnum’? remote: } else if (klass == rb_cFixnum) { remote: ^~~~~~~~~~ remote: mFixnum
Hmmm.
json (1.8.3)? I would have expected the current version (2.2.0).
I see... The Gemfile.lock.heroku
file is seriously out-of-date. Try deleting it and doing bundle install
again. If that succeeds, we should update the Gemfile.lock.heroku
file with the one you generate.
I don't have a Ruby env local. Can you put it in a branch?
or
I setup RoR - why not.
Do you have a good intro for that I'm on a Mac. Is it only $brew install ruby ?
https://gorails.com/setup/osx/10.13-high-sierra?
brew install rbenv ruby-build ?
Do I need Rails installed as well to do this?
I just pushed out a new Gemfile
for heroku (needed to do this anyways).
To get Ruby (and more generally, the commandline compiler tools needed for this and other tasks), what you need to do is install XCode.app and then install the commandline tools, that accompany it, by typing xcode-select --install
in a terminal window.
Then you should be able to
git clone https://github.com/parasew/instiki.git
cd instiki
ruby bundle install --path vendor/bundle
That'll get you a copy of Instiki on your Mac. To deploy to Heroku, get rid of the old Gemfile.lock.heroku
and follow the instructions.
I should say that, if you don't want to install a copy of Instiki locally on your Mac, just getting rid of the Gemfile.lock.heroku
file ought to be sufficient to deploy to Heroku (though, not having a Heroku deployment, myself, I haven't actually tried this).
Thanks. Heroku push wants a lock file
using the native bundler doesn't work. Lacks permissions on system gems. Intalling rbenv and 2.6.0 and then bundler gem. Will let you know how it goes.
using the native bundler doesn't work. Lacks permissions on system gems.
?? The whole point of bundler is to avoid globally installing the needed gems (instead, bundle install --path vendor/bundle
installs them in the aforementioned subdirectory of the Instiki directory).
Intalling rbenv and 2.6.0 and then bundler gem. Will let you know how it goes.
OK. Sorry about this. The Heroku model is that you first install your app locally, then push that exact configuration to Heroku. So I guess you really do need to be able to install locally ...
ok. Well, this was the last I got anyway. Using 2.6.0, so maybe I need to specify in the Gemfile.
2019-03-27T00:15:25.906184+00:00 heroku[web.1]: State changed from starting to crashed 2019-03-27T00:15:25.789992+00:00 app[web.1]: bundler: failed to load command: thin (/app/vendor/bundle/ruby/2.5.0/bin/thin)
Also, required postgres lib.
Thanks for your help
Umh. The Ruby gems installed by Bundler correspond to the version of Ruby in use (i.e., they are installed in vendor/bundle/ruby/2.x.x/
). If you change Ruby versions, you need to rerun bundle install
.
Also, required postgres lib.
Yes, the Heroku configuration uses postgres as the database in production.
What version of rails?
The version of rails used by Instiki is bundled with the application. That is not something you have to think about.
I just committed an updated Gemfile.lock.heroku
. Hopefully, that will do the trick for you.
heroku[web.1]: State changed from starting to crashed 2019-03-27T05:22:16.935076+00:00 app[web.1]: Missing the Rails gem. Please
gem install -v= rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. 2019-03-27T05:22:17.034298+00:00 heroku[web.1]: Process exited with status 1
???
Let me make sure I understand what you are doing.
- You did a
git clone https://github.com/parasew/instiki.git cd instiki heroku create [APPNAME] mv Gemfile Gemfile.orig git mv Gemfile.heroku Gemfile git mv Gemfile.lock.heroku Gemfile.lock git commit -m "Setup for heroku" git push heroku master heroku config:set RAILS_ENV=production heroku run rake db:migrate
- and you got the above error at what stage?
after >git push heroku master
and
heroku open
shows error
and
heroku logs
The app is running locally now. I like the s5 integration.
Well, I just set up a Heroku account, followed precisely the steps I set out in the Instiki README:
heroku login -i
git clone https://github.com/parasew/instiki.git
cd instiki
heroku create [APPNAME]
mv Gemfile Gemfile.orig
git mv Gemfile.heroku Gemfile
git mv Gemfile.lock.heroku Gemfile.lock
git commit -m "Setup for heroku"
git push heroku master
heroku config:set RAILS_ENV=production
heroku run rake db:migrate
and had an Instiki instance up and running on Heroku in under 5 minutes. I am going to assume (in the absence of other feedback) that the instructions worked for you too.