Rails & Heroku: PG db fails to create database - ruby-on-rails

I have almost read every question and doc about deployment to heroku, and this is not my first time, but now in a very weird scnario when I deploy I can't create the database:
Running `rake db:create --trace` attached to terminal... up, run.8982
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:create
FATAL: permission denied for database "postgres"
DETAIL: User does not have CONNECT privilege.
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `initialize'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `new'
.
.
.
.
Couldn't create database for {"adapter"=>"postgresql", "host"=>"ec2-23-23-244-144.compute-1.amazonaws.com", "encoding"=>"unicode", "database"=>"d80e387p61nnl1", "pool"=>5, "template"=>"template0", "username"=>"******", "password"=>"********", "port"=>5432}
It's not this:
FactoryGirl screws up rake db:migrate process
I took out everything related to Factory girl pretty much, everything in the spec file.
Not this either:
Rails 4.0.1 on Heroku, can't create database
this is my gemfile:
source 'https://rubygems.org'
ruby '1.9.3'
gem 'rails', '4.1.2'
#Assets
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'jquery-turbolinks'
gem 'turbolinks'
gem "autoprefixer-rails"
#jQuery
gem 'magnific-popup-rails'
gem 'ckeditor'
gem 'gmaps4rails'
gem "select2-rails"
gem 'chosen-rails'
gem 'jquery-tokeninput-rails'
gem 'jquery-timepicker-rails'
gem 'easy_as_pie'
gem 'modernizr-rails'
gem "font-awesome-rails"
gem 'jquery-slimscroll-rails'
gem 'jquery-placeholder-rails'
gem 'autosize-rails'
gem 'newrelic_rpm'
#frontend
gem 'rails_12factor', group: :production
gem 'friendly_id', '~> 5.0.0' # Note: You MUST use 5.0.0 or greater for Rails 4.0+
gem 'rack-cors', :require => 'rack/cors'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
gem 'bootstrap-sass'
gem 'devise'
gem 'high_voltage'
gem 'thin'
gem 'lodash-rails'
#Database
gem 'ransack'
gem 'pg'
gem 'pg_search'
gem 'simple_form'
# gem 'ng-rails-csrf'
gem 'wiselinks'
# Development Only
group :development do
gem 'binding_of_caller', :platforms=>[:mri_19]
gem 'rails_layout'
gem 'meta_request'
gem 'better_errors'
gem 'hirb' #use Hirb.enable to enable it / text to Column
gem 'awesome_print', :require => 'ap'
gem 'railroady' #run this command: rake diagram:all
gem "bullet" # it always works unless you remove the initilzer
gem "reek" # run this : reek .
gem 'brakeman', :require => false # run this : brakeman [appPath] -o output_file
gem 'traceroute' # to check unUsed and Unreachable routes > rake traceroute
gem 'quiet_assets' #takes away the Asset messages in the Log
gem 'annotate', ">=2.6.0"
gem "letter_opener", :group => :development
gem 'rails_apps_pages'
end
group :development, :test do
gem 'rspec-rails'
end
group :test do
gem 'capybara'
gem 'database_cleaner'
gem 'launchy'
gem 'selenium-webdriver'
end
gem 'ffaker'
gem 'populator'
gem 'activeadmin', github: 'gregbell/active_admin'
# gem "meta_search", '>= 1.1.0.pre'
#rails Legacy Gems
gem 'protected_attributes'
gem 'rails-observers'
gem 'actionpack-page_caching'
gem 'actionpack-action_caching'
#Images:
gem 'carrierwave'
gem 'rmagick', :require => false
gem 'kaminari'
# gem "bower-rails", "~> 0.8.3"
# gem 'react-rails', '~> 0.10.0.0'
# gem 'react-rails', '~> 1.0.0.pre', github: 'reactjs/react-rails'
# gem "therubyracer", :platforms => :ruby
# gem "therubyrhino", :platforms => :jruby
gem 'activerecord-reputation-system'
gem 'acts-as-taggable-on'
gem 'markable'
gem 'country_select', github: 'stefanpenner/country_select'
gem 'rails4-autocomplete'
# gem 'linkedin' hasie 3.3.0 error
#messaging
gem 'mailboxer'
IN my Heroku Logs, this what I found:
Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2014-09-07T17:20:38.089695+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-09-07T17:20:38.089697+00:00 app[web.1]: Exiting
2014-09-07T17:20:38.357403+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.2/lib/active_support/dependencies.rb:247:in `require': No such file to load -- mini_magick (LoadError)
2014-09-07T17:20:38.357406+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.2/lib/active_support/dependencies.rb:247:in `block in require'
any help would be veryyy very much appreciated.

There are few lessons to be learnt from this problem that I came across, but first let's answer and then explain what was going on.
Short answer:
Despite removing the tests that was considered to cause the rake to break, there were other things left out that needed to be removed and it was causing problems:
1- In the application.rbthis was happening:
config.generators do |g|
g.test_framework :rspec,
fixtures: true,
view_specs: false,
helper_specs: false,
routing_specs: false,
controller_specs: false,
request_specs: false
g.fixture_replacement :factory_girl, dir: "spec/factories"
end
2- In seed.rb file this was happening:
# user = CreateAdminService.new.call
# puts 'CREATED ADMIN USER: ' << user.email
The lesson:
1- Don't use auto app generators. In my case I was using #RailsComposer.
2- Bower on Rails is a bad decision, it can turn a very simple app to a crazy amazin jungle

Related

ruby on rails 4 -- bundle install grape-jbuilder

After I installed gem grape-jbuilder
and run bundle exec rails s it showed this message
bin/rails:6: warning: already initialized constant APP_PATH
/Users/xxx/xxx/bin/rails:6: warning: previous definition of APP_PATH was
here
Usage: rails COMMAND [ARGS]
The most common rails commands are:
generate Generate new code (short-cut alias: "g")
console Start the Rails console (short-cut alias: "c")
server Start the Rails server (short-cut alias: "s")
dbconsole Start a console for the database specified in config/database.yml
(short-cut alias: "db")
new Create a new Rails application. "rails new my_app" creates a
new application called MyApp in "./my_app"
In addition to those, there are:
destroy Undo code generated with "generate" (short-cut alias: "d")
plugin new Generates skeleton for developing a Rails plugin
runner Run a piece of code in the application environment (short-cut alias: "r")
All commands can be run with -h (or --help) for more information.
And when I run bundle exec rake rails:update:bin
It show the error message below
rake aborted!
LoadError: cannot load such file -- hashie/hash
/Users/xxx/xxx/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in require'
/Users/xxx/xxx/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:inblock in require'
/Users/xxx/xxx/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in load_dependency'
/Users/xxx/xxx/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:inrequire'
/Users/xxx/xxx/vendor/bundle/ruby/2.3.0/gems/grape-jbuilder-0.2.0/lib/grape/jbuilder.rb:2:in <top (required)>'
/Users/xxx/xxx/config/application.rb:7:in'
/Users/xxx/xxx/Rakefile:4:in require'
/Users/xxx/xxx/Rakefile:4:in'
/Users/xxx/xxx/vendor/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in <top (required)>'
/Users/xxx/.rbenv/versions/2.3.1/bin/bundle:23:inload'
/Users/xxx/.rbenv/versions/2.3.1/bin/bundle:23:in <main>'
LoadError: cannot load such file -- grape-jbuilder
/Users/xxx/xxx/config/application.rb:7:in'
/Users/xxx/xxx/Rakefile:4:in require'
/Users/xxx/xxx/Rakefile:4:in'
/Users/xxx/xxx/vendor/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in <top (required)>'
/Users/xxx/.rbenv/versions/2.3.1/bin/bundle:23:inload'
/Users/jiaping/.rbenv/versions/2.3.1/bin/bundle:23:in `'
(See full trace by running task with --trace)
Gemfile
gem 'rails', '4.2.4'
gem 'rack-contrib'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'therubyracer'
gem 'rb-readline'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'bootstrap-sass'
gem 'font-awesome-rails'
gem 'react-rails'
gem 'coffee-rails', '~> 4.1.0'
gem 'uglifier', '>= 1.3.0'
gem 'sass-rails'
gem 'momentjs-rails'
gem 'bootstrap3-datetimepicker-rails'
gem 'jquery-payment-rails', git: 'https://github.com/thoughtbot/jquery-payment-rails.git'
gem 'page_title_helper'
gem 'sprockets-es6', require: 'sprockets/es6'
gem 'jbuilder', '~> 2.0'
gem 'sorcery'
gem 'oauth2', '~> 1.3.0'
gem 'bcrypt'
gem 'dotenv-rails'
gem 'config', '~> 1.0.0'
gem 'enum_help'
gem 'mysql2', '~> 0.3.18'
gem 'squeel'
gem 'seed-fu'
gem 'carrierwave'
gem 'carrierwave-data-uri'
gem 'carrierwave-aws'
gem 'rmagick'
gem 'acts_as_list'
gem 'kaminari'
gem 'ransack'
gem 'rails-jquery-autocomplete'
gem 'gretel'
gem 'email_validator'
gem 'icalendar'
gem 'bootstrap_form'
gem 'paranoia', '~> 2.0'
gem 'unicorn'
gem 'unicorn-rails'
gem 'unicorn-worker-killer'
gem 'google-analytics-rails'
gem 'meta-tags'
gem 'web-console', '~> 2.0', group: :development
gem 'adminlte2-rails'
gem 'geocoder'
gem 'validates_timeliness', '~> 4.0'
gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby'
gem 'whenever', require: false
gem 'holiday_jp'
gem 'exception_notification', github: 'smartinez87/exception_notification'
gem 'slack-notifier'
gem 'grape'
gem 'grape-jbuilder'
group :staging do
gem 'letter_opener_web'
end
group :development, :test do
gem 'letter_opener'
gem 'spring'
gem 'spring-commands-rspec'
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'simplecov', require: false
gem 'rubocop'
gem 'byebug'
gem 'better_errors'
gem 'pry'
gem 'pry-byebug'
gem 'pry-doc'
gem 'pry-rails'
gem 'pry-stack_explorer'
gem 'quiet_assets'
gem 'awesome_print'
gem 'annotate'
gem 'migration_comments'
gem 'capistrano', '~> 3.4.0'
gem 'capistrano-rails'
gem 'capistrano-rbenv'
gem 'capistrano-bundler'
gem 'capistrano3-unicorn'
gem 'rails-admin-scaffold'
end
group :test do
gem 'capybara'
gem 'database_cleaner'
gem 'faker'
gem 'fuubar'
gem 'launchy'
gem 'selenium-webdriver'
gem 'shoulda-matchers'
gem 'timecop'
end
How can I solve this problem?
From here:
Actually it's spring which cause this issue. Try to comment it in the
Gemfile, then bundle install and restart the server ; shutting it
down, the warning is not present anymore.

Having errors with rake db:create

I'm trying to install fat free crm with ruby on rails on Windows 7, but when I put the command
rake db:create RAILS_ENV=production
it says
rake aborted!
LoadError: cannot load such -- 2.1/pg_ext
Normally, it would say what gem I should install, but not in this case.
How can I solve this error?
Edit:
A friend of mine suggested to uncomment mysql2 and comment pg on the Gemfile file in the proyect like this:
gem 'mysql2'
#gem 'sqlite3'
#gem 'pg'
But now I get this:
Unable to load the EventMachine C extension; To use the pure-ruby reactor, requi
re 'em/pure_ruby'
C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': ca
nnot load such file -- 2.1/rubyeventmachine (LoadError)
Have any ideas of why this happends?
Here is my Gemfile:
source 'https://rubygems.org'
# Uncomment the database that you have configured in config/database.yml
# ----------------------------------------------------------------------
gem 'mysql2'
# gem 'sqlite3'
# gem 'pg'
# Removes a gem dependency
def remove(name)
#dependencies.reject! {|d| d.name == name }
end
# Replaces an existing gem dependency (e.g. from gemspec) with an alternate source.
def gem(name, *args)
remove(name)
super
end
# Bundler no longer treats runtime dependencies as base dependencies.
# The following code restores this behaviour.
# (See https://github.com/carlhuda/bundler/issues/1041)
spec = Bundler.load_gemspec( File.expand_path("../fat_free_crm.gemspec", __FILE__) )
spec.runtime_dependencies.each do |dep|
gem dep.name, *(dep.requirement.as_list)
end
# Remove premailer auto-require
gem 'premailer', :require => false
# Remove fat_free_crm dependency, to stop it from being auto-required too early.
remove 'fat_free_crm'
group :development do
# don't load these gems in travis
unless ENV["CI"]
gem 'thin'
gem 'quiet_assets'
gem 'capistrano'
gem 'capistrano-bundler'
gem 'capistrano-rails'
gem 'capistrano-rvm'
#~ gem 'capistrano-chruby'
#~ gem 'capistrano-rbenv'
gem 'guard'
gem 'guard-rspec'
gem 'guard-rails'
gem 'rb-inotify', :require => false
gem 'rb-fsevent', :require => false
gem 'rb-fchange', :require => false
end
end
group :development, :test do
gem 'rspec-rails', '~> 2'
gem 'headless'
gem 'debugger', :platforms => 'mri_19' unless ENV["CI"]
gem 'byebug', :platforms => ['mri_20', 'mri_21'] unless ENV["CI"]
gem 'pry-rails' unless ENV["CI"]
end
group :test do
gem 'capybara'
gem 'selenium-webdriver'
gem 'database_cleaner'
gem "acts_as_fu"
gem 'factory_girl_rails'
gem 'zeus' unless ENV["CI"]
gem 'coveralls', :require => false
gem 'timecop'
end
group :heroku do
gem 'unicorn', :platform => :ruby
gem 'rails_12factor'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'execjs'
gem 'therubyracer', :platform => :ruby unless ENV["CI"]
end
gem 'turbo-sprockets-rails3'
It sounds like you are missing the pg gem from your Gemfile. Is it in the development group?
Can you post your Gemfile?
Uncomment #gem pg.
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby' is a separate error. Where did you get that Gemfile?

openshift deployment failing rails

my openshift deployment of rails 3.2 app fails , just after it tries to precompile assets
remote: Deployment id is 7aea3738
remote: Activating deployment
remote: Precompiling with 'bundle exec rake assets:precompile'
remote: /opt/rh/ruby193/root/usr/bin/ruby /var/lib/openshift/52e891c24382ec693c000092/app- root/runtime/repo/vendor/bundle/ruby/1.9.1/
bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
remote: rake aborted!
remote: Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to
Gemfile.)
this is my gemfile
source 'http://mirror1.prod.rhcloud.com/mirror/ruby/'
source 'http://rubygems.org'
gem 'rails', '3.2.14'
gem 'bootstrap-sass', '2.1'
gem 'bcrypt-ruby', '3.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'formtastic'
gem 'rack-cache', :require => 'rack/cache'
gem 'dragonfly', '~>0.9.15'
gem 'minitest'
gem 'thor', '= 0.14.6'
gem 'sqlite3','1.3.5'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development,:test do
gem 'sqlite3','1.3.5'
gem 'rspec-rails','2.11.0'
end
group :development do
gem 'annotate','2.5.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier','1.2.3'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
end
gem 'jquery-rails','2.0.2'
group :test do
gem 'capybara', '1.1.2'
end
group :production do
gem 'sqlite3','1.3.5'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
the code works perefectly on my windows 8 development environment, i want to use persistent storage and sqlite ( i got a similar error when trying mysql also , which is why i shifted to sqlite)

Rails 3.2 precompilation fails

I'm a newby in Rails, and I'm developing some app with 3.2.0. So, all is good, it works on my local environment, but when I try to push it to Heroku there are troubles with assets - my css files don't compile into one application.css file, therefore my final application.css is clean (you can see it by link my app on Heroku). There are no problems on my local machine. I've found some answers in Google and people recommended do the following command:
RAILS_ENV=production bundle exec rake assets:precompile
I tried to do it and got the following output:
/Users/marya/.rvm/rubies/ruby-1.9.3-p448/bin/ruby: No such file or directory -- ruby /Users/marya/.rvm/gems/ruby-1.9.3-p448#global/bin/rake assets:precompile (LoadError)
rake aborted!
Command failed with status (1): [/Users/marya/.rvm/rubies/ruby-1.9.3-p448/b...]
/Users/marya/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.0/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/marya/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.0/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/marya/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.0/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/marya/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:14:in `eval'
/Users/marya/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:14:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
I don't understand what it does mean, therefore I need your help. My Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.0'
gem 'bootstrap-sass', '2.1'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.11.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.2'
group :test do
gem 'capybara', '1.1.2'
gem 'factory_girl_rails', '4.1.0'
end
group :production do
gem 'pg', '0.12.2'
gem 'rails_12factor'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
If you need another project files, please, just tell me about it and Ill do it. Thanks in advance!
Seems to be an RVM quirk. I ran into this using rvm + ruby 2.0.0-p247 and this worked for me:
rvm ruby-2.0.0-p247#global do gem install executable-hooks

Rails: undefined method 'paginates_per'

I'm installing a gem called Carrier https://github.com/stanislaw/carrier/blob/master/Gemfile into a Rails 3.2.1 app. It uses Kaminari and when I did bundle install after adding gem "carrier" to my Gemfile, it showed that I was using kaminari
Using kaminari (0.13.0)
However, when I tried to rake db:migrate, I got this error
rake aborted
undefined method `paginates_per' for Carrier::Chain(Table doesn't exist):Class
Can anyone suggest a fix for this? I've copied the gemfile from the Carrier gem below and the Gemfile for my own app below that
(Carrier gem Gemfile)
source "http://rubygems.org"
gem 'require_all'
gem 'kaminari'
gem 'unread'
gem 'sugar-high'
gem 'sweetloader'
group :development, :test do
gem 'rails', '~> 3.1.0'
gem 'unicorn'
gem 'mysql2'
gem 'devise'
gem 'rake-kit'
gem 'cutter'
gem "jeweler", ">= 1.6.4"
gem "rspec-rails", '>= 2.5'
end
group :test do
gem 'capybara'
gem 'factory_girl'
gem 'spork'
gem "launchy"
gem 'shoulda'
end
Gemfile for my starter app
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'devise'
gem 'carrier'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
Update These are the migrations it installed when I ran install:migrations
rake carrier:install:migrations
Copied migration 20120229055640_create_messages.carrier.rb from carrier
Copied migration 20120229055641_create_chains.carrier.rb from carrier
Update
I tried to reinstall it again on another git branch it this time I got a slightly different error when I ran rake db:migrate
rake aborted!
undefined method `acts_as_readable' for Carrier::Message(Table doesn't exist):Class
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
You appear to be missing some database backing for what Carrier is trying to do. From the Carrier readme, it looks like you need to run rake carrier:install:migrations before running db:migrate. Have you done that?

Resources