Articles tagged 'database migrations'
November 23, 2011
This post was originally published in the Rambling Labs Blog on November 23, 2011.
The current project I’m working on is not using Ruby on Rails, but I still want to use ActiveRecord Migrations for the database changes.
There are some options out there for this, and most people that I read about and had this issue just use the activerecord gem and set up their rake tasks.
I don’t want to write my own rake tasks, since I feel that I would be reinventing the wheel. So what did I do? I created a new rails application, and stripped it down, removing everything that is not needed to run the migrations.
First, I created a rails application called ‘deploy’ on the root folder of the application with:
rails new deploy
Then, I removed all the…
September 20, 2011
This post was originally published in the Rambling Labs Blog on September 20, 2011.
I was trying to run the following command on a new rails 3.1 app and it was failing… badly.
rake db:migrate /home/edgar/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:4: warning: already initialized constant MAJOR /home/edgar/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:5: warning: already initialized constant MINOR /home/edgar/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:6: warning: already initialized constant BUILD /home/edgar/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:3: warning: already initialized constant NUMBERS /home/edgar/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version…