This error occurred while loading the following files:
post
Has anyone an idea on how the thing should be changed?
Here is PostsController
class PostsController < ApplicationController
def new
end
def index
@posts = Post.all
end
def create
@post = Post.new(post_params)
@post.save
redirect_to @post
end
def show
@post = Post.find(params[:id])
end
private
def post_params
params.require(:post).permit(:title, :text)
end
end
TIA
Paolo
It’s as simple as uploading a Git repository to GitHub. I don’t think there’s much you can do to break that. Start here and work your way through the bootcamp: https://help.github.com/articles/set-up-git
If yes, then both the guides that your are referring to are written for Rails 4. Your application is using Rails 3.2.14.
Check section “3.1 Installing Rails” => “If it says something like “Rails 4.0.0”, you are ready to continue.”
If you are learning Rails using the getting started guide I would suggest you upgrade your application to use Rails 4.0.0 for the best experience. If you get stuck you can also access the source code of the getting started guide @ https://github.com/rails/docrails/tree/master/guides/code/getting_started
“gem list rails” gives you a list of all the versions of Rails installed on your system. Your Rails application picks the version of Rails from the Gemfile.
Change “gem ‘rails’, ‘3.2.14’” to “gem ‘rails’, ‘4.0.0’” in your Gemfile.
Also make sure that rest of your Gemfile matches the Gemfile from Rails guide to avoid further problems with the getting started guide.