私はレールが初めてです。すべてがローカルではうまく動いていますが、英雄に展開した後、上記のエラーが表示されます。ここでNoMethodError(#Alll :: Nodes :: BindParam:0x007fe5554268b8のための未定義メソッド `val '):app/controllers/posts_controller.rb:10:` new'
はposts_controllersアクションです:
def new
@post = current_user.posts.build
end
、ここではschema.rbファイルの内容です:
ActiveRecord::Schema.define(version: 20160516214156) do
create_table "comments", force: :cascade do |t|
t.text "comment"
t.integer "post_id"
t.integer "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "comments", ["post_id"], name: "index_comments_on_post_id"
add_index "comments", ["user_id"], name: "index_comments_on_user_id"
create_table "posts", force: :cascade do |t|
t.text "description"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "image_file_name"
t.string "image_content_type"
t.integer "image_file_size"
t.datetime "image_updated_at"
t.integer "user_id"
end
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "users", ["email"], name: "index_users_on_email", unique: true
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end
あなたは直面している –
私はちょうど問題を解決しました: – Umerror
@Umerrorあなたはあなた自身で問題を解決し、あなたの質問への回答を投稿し、他の人がそれから恩恵を受けることができるように受け入れてください。結局のところ、それはStackoverflowの目的です。 –