Error seeding database


(JT) #1

Hi,

I’m installing Discourse on a Mac (Beginners Guide to Install Discourse on Mac OS X (macOS) for Development) and have gotten as far as to seeding the db. Migrating went OK and without issues.
Running the seeding command separately I get this error:

$ bundle exec rake db:seed_fu
    Please require the stackprof gem falling back to fast_stack
    URGENT: undefined method `value_to_integer' for ActiveRecord::ConnectionAdapters::Column:Class Failed to initialize site default
    Seed from /<snip>/discourse/db/fixtures/001_categories.rb
    rake aborted!
    NoMethodError: undefined method `value_to_integer' for ActiveRecord::ConnectionAdapters::Column:Class
    /Users/<snip>/.rvm/gems/ruby-2.2.1/gems/seed-fu-2.3.5/lib/seed-fu/runner.rb:46:in `eval'
    /<snip>/discourse/lib/sql_builder.rb:102:in `each' ...

Any help is appreciated :slight_smile:


(Sam Saffron) #2

are you running Rails 4.2 or something? Did you do a bundle update?


(JT) #3

Yes, 4.2.1. Bundle update installs that version it seems. Which rails version should I use? :slight_smile:


(Jens Maier) #4

Well, there’s your problem. Don’t run bundle update, run bundle install. :grin:
(But first, reset/checkout your Gemfile.lock file.)


(JT) #5

Aha, I did run bundle install first, but then bundle update again at some point later. That could explain it :slight_smile: Thanks!