I’m working on installing Engage!
I followed the installation instructions found here: http://engagecsm.com/readme
Installation steps I did:
- Add Engage! to the application’s Gemfile: gem ‘engagecsm’.
- Install it: bundle install.
- Run the generator: rails generate engage User.
- Run the migrations: rake db:migrate.
Now, I can go to localhost:3000/engage

This is what shows up:

Now, when I hit “Create Topic”, nothing happens on the site. I look at my rails server console and I see this: (Easier to view here https://i.stack.imgur.com/xKBER.png, full stack trace found at the bottom)
![Started POST "/engage/topics" for 127.0.0.1 at 2013-01-19 19:48:26 -0700 Processing by Engage::TopicsController#create as JS Parameters: {"utf8"=>"✓", "authenticity_token"=>"aRKQAwMsnc1DJJ62S6bb7EkhFkzuCDtNL0kV756LIP4=", "topic"=>{"style"=>"question", "title"=>"ww", "message"=>"www", "follow"=>"1"}, "commit"=>"Create Topic"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Engage::UserProfile Load (0.4ms) SELECT "engage_user_profiles".* FROM "engage_user_profiles" WHERE "engage_user_profiles"."user_id" = 1 LIMIT 1 (0.1ms) begin transaction Engage::UserProfile Load (0.3ms) SELECT "engage_user_profiles".* FROM "engage_user_profiles" INNER JOIN "users" ON "engage_user_profiles"."user_id" = "users"."id" WHERE "users"."id" = 1 LIMIT 1 SQL (1.2ms) INSERT INTO "engage_topics" ("comments_count", "created_at", "followers_count", "message", "private", "status", "string", "style", "title", "updated_at", "user_id", "votes_count") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["comments_count", 0], ["created_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["followers_count", 0], ["message", "www"], ["private", false], ["status", "pending"], ["string", nil], ["style", "question"], ["title", "ww"], ["updated_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["user_id", 1], ["votes_count", 0]] Engage::Following Load (0.3ms) SELECT "engage_followings".* FROM "engage_followings" WHERE "engage_followings"."topic_id" = 7 AND "engage_followings"."user_id" = 1 LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Binary data inserted for <code>string</code> type on column <code>token</code> SQL (0.9ms) INSERT INTO "engage_followings" ("created_at", "token", "topic_id", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["created_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["token", "5813db34aaedfa6226cf77b7a17d5dfbcf8d4560"], ["topic_id", 7], ["updated_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["user_id", 1]] Engage::Topic Load (0.2ms) SELECT "engage_topics".* FROM "engage_topics" WHERE "engage_topics"."id" = 7 ORDER BY created_at DESC LIMIT 1 SQL (0.8ms) UPDATE "engage_topics" SET "followers_count" = COALESCE("followers_count", 0) + 1 WHERE "engage_topics"."id" IN (SELECT "engage_topics"."id" FROM "engage_topics" WHERE "engage_topics"."id" = 7 ORDER BY created_at DESC) (3.8ms) commit transaction (0.1ms) begin transaction (0.1ms) rollback transaction Completed 500 Internal Server Error in 71msActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes: user): activemodel (3.2.11) lib/active_model/mass_assignment_security/sanitizer.rb:48:in <code>process_removed_attributes' activemodel (3.2.11) lib/active_model/mass_assignment_security/sanitizer.rb:20:in</code>debug_protected_attribute_removal' activemodel (3.2.11) lib/active_model/mass_assignment_security/sanitizer.rb:12:in `sanitize'](https://i.stack.imgur.com/xKBER.png)
So I start googling, and I see things like this:
- Can't mass-assign protected attributes: user
- http://guides.rubyonrails.org/security.html#mass-assignment
I already added attr_accessible :user to my User model, but that didn’t work.
Here’s my User model:

Also, I can’t see how I have access to Engage models and such, see here’s my directory:

Does anyone know how to fix this? If you want any other information, please tell me and I’ll provide screenshots.
Any help is greatly appreciated. Thank you!
EDIT #1 – Adding application controller picture and full stack trace
This is the only place I can see anything with Engage! in controllers (I don’t have a User controller at this time)

Here’s the full stack trace:
![Started POST "/engage/topics" for 127.0.0.1 at 2013-01-19 19:48:26 -0700 Processing by Engage::TopicsController#create as JS Parameters: {"utf8"=>"✓", "authenticity_token"=>"aRKQAwMsnc1DJJ62S6bb7EkhFkzuCDtNL0kV756LIP4=", "topic"=>{"style"=>"question", "title"=>"ww", "message"=>"www", "follow"=>"1"}, "commit"=>"Create Topic"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Engage::UserProfile Load (0.4ms) SELECT "engage_user_profiles".* FROM "engage_user_profiles" WHERE "engage_user_profiles"."user_id" = 1 LIMIT 1 (0.1ms) begin transaction Engage::UserProfile Load (0.3ms) SELECT "engage_user_profiles".* FROM "engage_user_profiles" INNER JOIN "users" ON "engage_user_profiles"."user_id" = "users"."id" WHERE "users"."id" = 1 LIMIT 1 SQL (1.2ms) INSERT INTO "engage_topics" ("comments_count", "created_at", "followers_count", "message", "private", "status", "string", "style", "title", "updated_at", "user_id", "votes_count") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["comments_count", 0], ["created_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["followers_count", 0], ["message", "www"], ["private", false], ["status", "pending"], ["string", nil], ["style", "question"], ["title", "ww"], ["updated_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["user_id", 1], ["votes_count", 0]] Engage::Following Load (0.3ms) SELECT "engage_followings".* FROM "engage_followings" WHERE "engage_followings"."topic_id" = 7 AND "engage_followings"."user_id" = 1 LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Binary data inserted for <code>string</code> type on column <code>token</code> SQL (0.9ms) INSERT INTO "engage_followings" ("created_at", "token", "topic_id", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["created_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["token", "5813db34aaedfa6226cf77b7a17d5dfbcf8d4560"], ["topic_id", 7], ["updated_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["user_id", 1]] Engage::Topic Load (0.2ms) SELECT "engage_topics".* FROM "engage_topics" WHERE "engage_topics"."id" = 7 ORDER BY created_at DESC LIMIT 1 SQL (0.8ms) UPDATE "engage_topics" SET "followers_count" = COALESCE("followers_count", 0) + 1 WHERE "engage_topics"."id" IN (SELECT "engage_topics"."id" FROM "engage_topics" WHERE "engage_topics"."id" = 7 ORDER BY created_at DESC) (3.8ms) commit transaction (0.1ms) begin transaction (0.1ms) rollback transaction Completed 500 Internal Server Error in 71ms](https://i.stack.imgur.com/Gnwpg.png)
![SQL (0.9ms) INSERT INTO "engage_followings" ("created_at", "token", "topic_id", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["created_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["token", "5813db34aaedfa6226cf77b7a17d5dfbcf8d4560"], ["topic_id", 7], ["updated_at", Sun, 20 Jan 2013 02:48:26 UTC +00:00], ["user_id", 1]] Engage::Topic Load (0.2ms) SELECT "engage_topics".* FROM "engage_topics" WHERE "engage_topics"."id" = 7 ORDER BY created_at DESC LIMIT 1 SQL (0.8ms) UPDATE "engage_topics" SET "followers_count" = COALESCE("followers_count", 0) + 1 WHERE "engage_topics"."id" IN (SELECT "engage_topics"."id" FROM "engage_topics" WHERE "engage_topics"."id" = 7 ORDER BY created_at DESC) (3.8ms) commit transaction (0.1ms) begin transaction (0.1ms) rollback transaction Completed 500 Internal Server Error in 71ms ActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes: user): activemodel (3.2.11) lib/active_model/mass_assignment_security/sanitizer.rb:48:in <code>process_removed_attributes' activemodel (3.2.11) lib/active_model/mass_assignment_security/sanitizer.rb:20:in</code>debug_protected_attribute_removal' activemodel (3.2.11) lib/active_model/mass_assignment_security/sanitizer.rb:12:in <code>sanitize' activemodel (3.2.11) lib/active_model/mass_assignment_security.rb:230:in</code>sanitize_for_mass_assignment' activerecord (3.2.11) lib/active_record/attribute_assignment.rb:75:in <code>assign_attributes' activerecord (3.2.11) lib/active_record/base.rb:497:in</code>initialize' activerecord (3.2.11) lib/active_record/reflection.rb:183:in <code>new' activerecord (3.2.11) lib/active_record/reflection.rb:183:in</code>build_association' activerecord (3.2.11) lib/active_record/associations/association.rb:233:in <code>build_record' activerecord (3.2.11) lib/active_record/associations/collection_association.rb:434:in</code>block in create_record' activerecord (3.2.11) lib/active_record/associations/collection_association.rb:149:in <code>block in transaction' activerecord (3.2.11) lib/active_record/connection_adapters/abstract/database_statements.rb:192:in</code>transaction' activerecord (3.2.11) lib/active_record/transactions.rb:208:in <code>transaction' activerecord (3.2.11) lib/active_record/associations/collection_association.rb:148:in</code>transaction' activerecord (3.2.11) lib/active_record/associations/collection_association.rb:433:in <code>create_record' activerecord (3.2.11) lib/active_record/associations/collection_association.rb:119:in</code>create' activerecord (3.2.11) lib/active_record/associations/collection_proxy.rb:46:in <code>create' engagecsm (1.0.8) app/controllers/engage/topics_controller.rb:46:in</code>create' actionpack (3.2.11) lib/action_controller/metal/implicit_render.rb:4:in <code>send_action' actionpack (3.2.11) lib/abstract_controller/base.rb:167:in</code>process_action' actionpack (3.2.11) lib/action_controller/metal/rendering.rb:10:in <code>process_action' actionpack (3.2.11) lib/abstract_controller/callbacks.rb:18:in</code>block in process_action' activesupport (3.2.11) lib/active_support/callbacks.rb:426:in `block in _run__2010401100414174750__process_action__2035169522325419882__callbacks'](https://i.stack.imgur.com/71Wwi.png)


EDIT #2 – Add engage environment:
Also, we have Devise (and OmniAuth I believe…) installed. Therefore, we have “current_user”, but I don’t know if we have a “username” or “email” method, unless that comes standard with Devise or something

EDIT #3 – As Geoff suggested, I looked at line 46 of the topics_controller. That line is the following:
@topic.votes.create(:user => engage_current_user)
it’s one of Engage! developers here. I can see there are two problems with Engage! described above.
We have found the solution to the first (the one that you have solved with
attr_accessible :user), so expect a Rubygems update soon.The second (the fact that topics are not actually displayed on the index page) is connected with the changes in the cancan gem. We still have to figure out the best way to approach this, but a quick workaround is to lock the cancan version in the Gemfile as follows:
gem 'cancan', '1.6.7'.We will let you know when the updates addressing these issues will be available at Rubygems.
Cheers!