I have a rails 3.2.3 application which I was developing on my windows machine using git_bash as cli and mingw32 as environment (installed this env using railsinstaller)and postgres as db. But there were some problems with rmagick and couldn't use it, although minimagick was working as expected.
Now, I am going to move application to my new mac machine running OS X mountain lion. I have installed rails 3.2.8 and ruby on OS X using rvm. what do I need to do to update my application to rails 3.2.8 and setup db and other gems, should I delete or not delete gemfile.lock and what gems I need to remove or add or change version no. etc.
I am new to rails, please help
thanks!
Should I install postgres using homebrew or download from http://www.postgresql.org/download/macosx/ which is a preffered way of installing postgres, pros and cons of these methods.
Gemfile.lock
gives A list of gems used to ensure that all copies of the app use the same gem versions.
since I'm the only one working on this app and it's not yet in production. So, for me it makes more sense that I nuke Gemfile.lock and specify updated versions of gems I want now.
Things I did
Copied my application directory from my windows machine after cleaning some data in my tmp/ directory( tmp/ directory had 100M of data).
Installed imagemagick
using brew install imagemagick
Installed postgresql
using brew install postgresql
Generated a sample app using rails new blog -d postgresql
Changed database.yml file according to postgresql, as it required my mac user to be the username.
run sample blog app, and it was working fine. created a scaffolding and entered data and everything was working.
copied content of Gemfile.lock from blog application and pasted in my application's Gemfile.lock
changed version of rails in my Gemfile from 3.2.3 to latest version 3.2.8. changed version of some other gems.Replaced 'minimagick' with 'rmagick'. (I had problem with installing rmagick gem on windows, minimagick gem somehow worked on windows with older version of imagemagick). Changed database.yml.
run rake db:create:all
to create all the db.
run rake db:migrate
Run bundle
and it installed all the dependecies.
run rails s
Everything is working fine now :)