1

I am trying to access salesforce.com using the databasedotcom gem. I downloaded noeticpenguin's databasedotcom-demo program from github to get familiar with the gem but after inserting the appropriate username, password, and security code and running it locally, I get this error.

ActiveRecord::StatementInvalid: Could not find table 'Roles'

It says that the error is coming from this file.

class User < ActiveRecord::Base
  rolify
  attr_accessible :role_ids, :as => :admin
  attr_accessible :provider, :uid, :name, :email

def self.create_with_omniauth(auth)
    create! do |user|
      user.provider = auth['provider']
      user.uid = auth['uid']
      if auth['info']
     user.name = auth['info']['name'] || ""
     user.email = auth['info']['email'] || ""
      end
    end
  end
end

I've seen some stuff with similar errors about having to build or prepare the table before running it, but I can't figure out how to do it. What might I do to fix this error?

TaiwanTimmy
  • 177
  • 1
  • 1
  • 11
  • 1
    I havent looked at the example code. But it might need `rake db:migrate` before you start the application to create that table? :-/ – uday Jul 14 '14 at 20:48

0 Answers0