Error activerecord ruby on rails

5 views
Skip to first unread message

Antonio Arcos

unread,
Apr 10, 2014, 7:23:34 AM4/10/14
to refine...@googlegroups.com

hello developers I am in trouble.

I wrote the command rake db:migrate and after I saw my log and I have an error :

Started GET "/" for 141.21.12.238 at 2014-04-10 10:27:49 +0200
Processing by Refinery::PagesController#home as HTML
  Parameters: {"locale"=>:de}
Completed 500 Internal Server Error in 7ms

ActiveRecord::StatementInvalid (Could not find table 'refinery_roles'):
  app/models/refinery/role.rb:14:in `[]'

This is my file role.rb:

module Refinery
  class Role < Refinery::Core::BaseModel

    has_and_belongs_to_many :users, :join_table => :refinery_roles_users

    before_validation :camelize_title
    validates :title, :uniqueness => true

    def camelize_title(role_title = self.title)
      self.title = role_title.to_s.camelize
    end

    def self.[](title)
      find_or_create_by_title(title.to_s.camelize)
    end

  end
end

I hope your answer soon.

Antonio

Philip Arndt

unread,
Apr 10, 2014, 9:20:38 AM4/10/14
to refine...@googlegroups.com
Is this a stock installation of Refinery or have you customised it?
Reply all
Reply to author
Forward
0 new messages