7

Installing Rails 2.6 on OSX and a Creating New Application

 3 years ago
source link: https://fuzzyblog.io/blog/rails/2019/08/17/installing-rails-2-6-on-osx-and-a-creating-new-application.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Installing Rails 2.6 on OSX and a Creating New Application

Aug 17, 2019

So Rails 2.6 has been released and I just went thru the normal update dance. Here's how I handled upgrading my system. Let's start with the basics:

  • OSX Mojave
  • Ruby 2.5.1
  • MySQL (yeah, yeah I know; not apologizing)

Here is what I did (you should know that I hit issues with older versions of Yarn and Node so I've included updating them as part of this):

  1. Started a terminal session.
  2. Verified my ruby version:

    ruby –version

  3. Verified my rails version:

    rails –version

  4. Upgrade Yarn:

    curl -o- -L https://yarnpkg.com/install.sh bash

  5. You can either start a new terminal to get your path exports correct (it is set on Terminal start) or simply do this:

    export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

  6. Upgrade node:

    brew upgrade node

  7. Upgrade Ruby to 2.6.2 (not required but I figured why not):

    rvm install 2.6.2

  8. Change to the new ruby:

    rvm use ruby-2.6.2

  9. Generate a new application:

    rails new lauck –database=mysql

  10. If you got anxious and generated a new application prior to installing a new ruby then, you would need to update the Gemfile to reflect the Ruby version and bundle install.

Note: I've named this new test application after one of my favorite librarians.

References:


Posted In: #rails


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK