camertron / active_nutrition

An ActiveRecord-backed collection of models for storing and retrieving nutritional information from the USDA's Nutrient Database.
33 stars 20 forks source link

Cannot use with Rails 3.2.12 #1

Closed dbrmr closed 11 years ago

dbrmr commented 11 years ago

With Rails 3.2.12 new application added to gemfile installed the gem the following command fails: bundle exec rake active_nutrition:migrate active_nutrition:rebuild with PG::Error: ERROR: relation "active_nutrition_migrations" already exists the same goes with other databases Sorry, I am new to Rails, hope this is enough information.

camertron commented 11 years ago

Hey @dbrmr, looks like there was a problem with the Migration model. I just pushed a fix up to master and bumped the version up to 0.6.1. You should be able to test it by adding this to your gemfile:

gem 'active_nutrition', :github => 'forrager/active_nutrition'

Note that you might have to recreate your database: RAILS_ENV=development bundle exec rake db:drop db:create

Let me know if that works!

dbrmr commented 11 years ago

That fixed the migration issue. Importing the data takes forever :) But it gave me another error Untitled It cannot import the micro sign, but it is probably issue in my setup. I can import the data myself and I will deal with it.