Mar 082016
 

I’m in the process of reviving another project in addition to the React Native project which admittedly has stalled a bit over the last few months. I blame basketball and soccer season.

After looking at the web setups that my hosting company supports and vowing not to go down the PHP road again, I’m trying to get setup with Ruby on Rails. This post has been a pretty good guide to getting up and running on a Mac. I did run into several things that article did not cover, so I thought I’d cover them here.

First off, what led me to that post was that I tried using the install of Ruby already installed on with OSX and immediately ran into permissions problems as described in this Stack Overflow post. Apparently, it’s not a good idea to use the system Ruby and you have to install a development copy. As I followed the steps in the GoRails post, I ran across a few more issues.

I really like Homebrew, but you do need to be sure to update it frequently and probably should run the update prior to any new install. I tried installing MySQL and hit a few issues as I did it. The first was because I didn’t keep homebrew up to date.

I ran

homebrew doctor

to reveal that I didn’t have permissions on /usr/local/bin for some reason. Once that was fixed and I got MySQL installed, I tried following the instructions that show at the end of the install. Unfortunately, those instructions assumed that a symbolic link had been created that did not exist. Luckily, the GoRails article included the step to first create the symbolic link and the setup went well after that.

My last issue was encountered while trying to create the database during the initial application setup in Rails. It turns out the version of MySQL installed via Homebrew is not compatible with the version of Rails that I installed while following the article. In addition to needing to supply the database credentials in the yaml file as specified in the setup, I had to give a specific version of MySQL in the gemfile:

gem 'mysql2', '0.3.20'

Once getting through that, I was able get the Rails welcome page.

 Posted by on March 8, 2016 at 9:01 pm

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.