Engageのインストールに取り組んでいます!
ここにあるインストール手順に従いました:http://engagecsm.com/readme
私が行ったインストール手順:
- エンゲージを追加!アプリケーションのGemfileに:gem'engagecsm'。
- インストール:バンドルインストール。
- ジェネレーターを実行します。railsgenerateengageUser。
- 移行を実行します:rakedb:migrate。
これで、localhost:3000/engageに移動できます
これが表示されるものです:
さて、「トピックの作成」を押しても、サイトでは何も起こりません。Railsサーバーコンソールを見ると、次のことがわかります:(ここで見やすくhttp://i.stack.imgur.com/xKBER.png、下部にある完全なスタックトレース)
"✓"," "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="" (0.4ms)="" "engage_user_profiles".*="" "engage_user_profiles"="" "engage_user_profiles"."user_id"="1" (0.1ms)="" begin="" transaction="" inner="" join="" on="" ."id"="" 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",="" ["message",="" "www"],="" ["private",="" false],="" ["status",="" "pending"],="" ["string",="" nil],="" ["style",="" "question"],="" ["title",="" "ww"],="" ["updated_at",="" ["user_id",="" 1],="" ["votes_count",="" 0]]="" engage::following="" "engage_followings".*="" "engage_followings"="" "engage_followings"."topic_id"="7" and="" "engage_followings"."user_id"="1" (0.2ms)="" binary="" data="" inserted="" <code>string<="" code>="" type="" column="" <code>token<="" (0.9ms)="" ("created_at",="" "token",="" "topic_id",="" "user_id")="" [["created_at",="" ["token",="" "5813db34aaedfa6226cf77b7a17d5dfbcf8d4560"],="" ["topic_id",="" 7],="" 1]]="" engage::topic="" "engage_topics".*="" "engage_topics"."id"="7" order="" created_at="" desc="" (0.8ms)="" update="" set="" "followers_count"="COALESCE("followers_count"," 0)="" +="" in="" (select="" desc)="" (3.8ms)="" commit="" rollback="" completed="" 500="" internal="" server="" error="" 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'="" sanitizer.rb:20:in<="" code>debug_protected_attribute_removal'="" sanitizer.rb:12:in="" `sanitize'"="">
だから私はグーグルを始めます、そして私はこのようなものを見ます:
すでにattr_accessible:userをユーザーモデルに追加しましたが、機能しませんでした。
これが私のユーザーモデルです:
また、Engageモデルなどにアクセスする方法がわかりません。次のディレクトリを参照してください。
誰かがこれを修正する方法を知っていますか?その他の情報が必要な場合は、教えてください。スクリーンショットを提供します。
どんな助けでも大歓迎です。ありがとうございました!
編集#1-アプリケーションコントローラーの画像と完全なスタックトレースを追加する
これは私がEngageで何でも見ることができる唯一の場所です!コントローラー内(現時点ではユーザーコントローラーはありません)
完全なスタックトレースは次のとおりです。
"✓"," "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="" (0.4ms)="" "engage_user_profiles".*="" "engage_user_profiles"="" "engage_user_profiles"."user_id"="1" (0.1ms)="" begin="" transaction="" inner="" join="" on="" ."id"="" 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",="" ["message",="" "www"],="" ["private",="" false],="" ["status",="" "pending"],="" ["string",="" nil],="" ["style",="" "question"],="" ["title",="" "ww"],="" ["updated_at",="" ["user_id",="" 1],="" ["votes_count",="" 0]]="" engage::following="" "engage_followings".*="" "engage_followings"="" "engage_followings"."topic_id"="7" and="" "engage_followings"."user_id"="1" (0.2ms)="" binary="" data="" inserted="" <code>string<="" code>="" type="" column="" <code>token<="" (0.9ms)="" ("created_at",="" "token",="" "topic_id",="" "user_id")="" [["created_at",="" ["token",="" "5813db34aaedfa6226cf77b7a17d5dfbcf8d4560"],="" ["topic_id",="" 7],="" 1]]="" engage::topic="" "engage_topics".*="" "engage_topics"."id"="7" order="" created_at="" desc="" (0.8ms)="" update="" set="" "followers_count"="COALESCE("followers_count"," 0)="" +="" in="" (select="" desc)="" (3.8ms)="" commit="" rollback="" completed="" 500="" internal="" server="" error="" 71ms"="">
編集#2-エンゲージ環境を追加します:
また、Devise(および私が信じているOmniAuth ...)がインストールされています。したがって、「current_user」がありますが、「username」または「email」メソッドがあるかどうかはわかりません。ただし、Deviseなどに標準で付属している場合を除きます。
編集#3-Geoffが提案したように、topics_controllerの46行目を調べました。その行は次のとおりです。
@ topic.votes.create(:user => Engage_current_user)