-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActionView::Template::Error (undefined method `email' for #<User:0x7f221f293ce8>): #236
Comments
Everything suggest that your database have not those fields. Did you run the migrations? |
I see, but it work in Rails Console when try to test "User.email", |
Migrations are also needed in the rails console. Try:
|
I try already but error still remain. sir Error: NoMethodError in Frontpage#index Showing /home/lookmee/.rvm/gems/ruby-1.8.7-p357@astvplus/gems/social_stream-base-0.17.3/app/views/layouts/_header_signed_out.erb where line #11 raised: undefined method `email' for #User:0x7feb0c1b1440 Extracted source (around line #11): 8: <%= form_for User.new, :as => :user, :url => user_session_path do |f| -%> 10: 11: <%= f.label :email %> 12: <%= f.email_field :email, :class => "input_username" %> 13: 14: |
Could you run the following command and paste the output? rails r "puts Actor.inspect" |
$ rails r 'puts Actor.inspect' |
Maybe you have your own User model in your application, overwriting social stream's one? |
User model come from devise sir. $ rails r "puts User.inspect" |
Social Stream defines user and conflicts with devise's user generator. You must not run "rails g devise user" before "rails g social_stream:install" |
I create new rails (3.2.2) only gem social_stream and run rails g social_stream:install. I got Multiple migration. How to fix it? /home/lookmee/.rvm/gems/ruby-1.8.7-p357@astvplus/gems/activerecord-3.2.2/lib/active_record/migration.rb:620:in `migrations': Multiple migrations have the version number 20120321133028 (ActiveRecord::DuplicateMigrationVersionError) |
how to prevent to generate multiple migrations |
Which is the other migration with version number 20120321133028? Could you post the output of |
$ cat 20120321133028_add_notified_object.rb def self.down |
ls please |
$ ls |
$ ls db/migrate/20120321133028* |
Ok, this is a mailboxer issue. See: mailboxer/mailboxer#35 |
Thank you. what is the stable way to run "rails g"? |
i run rails destroy social:install. and i found conflict on 20120321133028*.
|
What do you mean by "stable"? |
Sorry. I mean step-by-step of rails g and can i skip social_stream:install? SocialStream: social_stream:linkser:install |
This is fixed in maiboxer 0.6.5 |
I run social_stream in Rails 3.2.2.
in social_stream-base-0.17.3/app/views/layouts/_header_signed_out.erb
ActionView::Template::Error (undefined method `email' for #User:0x7f221f293ce8):
9:
10:
11: <%= f.label :email %>
12: <%= f.email_field :email, :class => "input_username" %>
13:
14:
15: <%= f.label :password %>
Do any one have idea?
The text was updated successfully, but these errors were encountered: