{"id":156,"date":"2020-01-16T00:16:07","date_gmt":"2020-01-15T23:16:07","guid":{"rendered":"http:\/\/www.underealm.com\/tech\/?p=156"},"modified":"2020-01-16T00:16:07","modified_gmt":"2020-01-15T23:16:07","slug":"updating-ruby-and-rails-with-rbenv","status":"publish","type":"post","link":"http:\/\/www.underealm.com\/tech\/2020\/01\/updating-ruby-and-rails-with-rbenv\/","title":{"rendered":"Updating Ruby and Rails with rbenv"},"content":{"rendered":"\n<p>If you installed both Ruby and Rails using <code>rbenv<\/code>, then updating will be a breeze\u2026 more or less. Before updating anything though, install the plugin <a href=\"https:\/\/github.com\/rkh\/rbenv-update\">rbenv-updater<\/a> if you didn&#8217;t already.<\/p>\n\n\n\n<p>Updating and installing the new ruby version is quite easy:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> rbenv update\n> rbenv install -l | grep ^[0-9]\nlist of Ruby versions\n> rbenv install -v &lt;version><\/code><\/pre>\n\n\n\n<p>From within your rails project update the files <code>.ruby-version<\/code> and <code>Gemfile<\/code> with the appropriate ruby version, and if you&#8217;re doing a rails upgrade as well update the Gemfile accordingly. Then issue the commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> bundle update --bundler\n> rails app:update\nfile checks will be needed here<\/code><\/pre>\n\n\n\n<p>Start your server with puma or rails s and check that everything is working properly. If you need to downgrade due to troubles, you can revert the version changes in the files, delete the <code>Gemfile.lock<\/code> if needed, issue a <code>bundle uninstall<\/code> which will end quickly, and you&#8217;re done. No harm, no foul.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you installed both Ruby and Rails using rbenv, then updating will be a breeze\u2026 more or less. Before updating anything though, install the plugin rbenv-updater if you didn&#8217;t already. Updating and installing the new ruby version is quite easy: From within your rails project update the files .ruby-version and Gemfile with the appropriate ruby [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[88,87],"class_list":["post-156","post","type-post","status-publish","format-standard","hentry","category-antifud","tag-rails","tag-ruby"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/posts\/156"}],"collection":[{"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":1,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":158,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/posts\/156\/revisions\/158"}],"wp:attachment":[{"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}