Register • FAQ • Memberlist • Usergroups • Tutorials Point • Log in

| Page 1 of 2 Goto page 1, 2 Next

Ruby on Rails - 2.1 Tutorial
Author | Message
--- | ---
tutorialspoint Site Admin Joined: 27 Apr 2007 Posts: 134 | Ruby on Rails - 2.1 Tutorial Dear Friends, This is just for your information that I have started preparing a tutorial on Ruby on Rails 2.1 and it will be uploaded before end of June 2008. Hope you will like this tutorial as well. Thanks
_________________
Moderator, TP
Keep visiting and share this site with your friends.
Sat Jun 14, 2008 8:27 pm |
richardwo Joined: 12 Aug 2008 Posts: 1 | Post Confirmation Thanks for your post. This post will be reviewed by webmaster and will be online very soon.!
Tue Aug 12, 2008 10:16 am |
peekay Joined: 17 Jun 2009 Posts: 2 | Hello, I have been following this tutorial, but ran into a problem. In: http://www.tutorialspoint.com/ruby-on-rails/rails-views.htm I get to the point where I created the new method, but once I navigate to http://localhost:3000/book/new, I end up with this error:
NoMethodError in Book#new
Showing app/views/book/new.html.erb where line #4 raised:
undefined method `title' for #<Book id: nil, created_at: nil, updated_at: nil>
Extracted source (around line #4):
1: <h1>Add new book</h1>
2: <% form_tag :action => 'create' do %>
3: <p><label for="book_title">Title</label>:
4: <%= text_field 'book', 'title' %></p>
5: <p><label for="book_price">Price</label>:
6: <%= text_field 'book', 'price' %></p>
7: <p><label for="book_subject">Subject</label>:
Can someone help me out. This is my first RoR tutorial and I'm already stuck
Thanks!
Wed Jun 17, 2009 3:48 am |
tutorialspoint Site Admin Joined: 27 Apr 2007 Posts: 134 | Hi, I would suggest you to follow my tutorial a to z. I have tested all the examples very well before uploading them on the site. Thanks _________________ Moderator, TP
Keep visiting and share this site with your friends.
Wed Jun 17, 2009 6:54 pm |
peekay Joined: 17 Jun 2009 Posts: 2 | I have been following it A to Z multiple times now. I still get an error associated with the "new" view, specifically the text_field or collection_select methods. I get a "No Method Error" that reads: Showing app/views/book/new.html.erb where line #4 raised:
undefined method `title' for #<Book id: nil, created_at: nil, updated_at: nil>
I believe that the tutorial works, I'm just looking for help with what might be wrong with my setup if I make it all the way to this point and repeatedly run into this problem. Thanks.
Wed Jul 22, 2009 11:56 pm |
uncele Joined: 07 Oct 2009 Posts: 1 |

> ###### Quote:

> I have been following it A to Z multiple times now. I still get an error associated with the "new" view, specifically the text_field or collection_select methods. I get a "No Method Error" that reads:
> Showing app/views/book/new.html.erb where line #4 raised:
> undefined method `title' for #<Book id: nil, created_at: nil, updated_at: nil>
> I believe that the tutorial works, I'm just looking for help with what might be wrong with my setup if I make it all the way to this point and repeatedly run into this problem. Thanks.

So, nobody have solution for this problem?
I'm stuck too in this plase.
If somebody know, how fix it, please help.
Wed Oct 07, 2009 11:06 pm |
Tantor Joined: 21 Feb 2010 Posts: 1 | Hi, I have the same problem: NoMethodError in Book#new Showing app/views/book/new.rhtml where line #4 raised: undefined method `title' for #<Book id: nil, created_at: nil, updated_at: nil> Extracted source (around line #4):
1: <h1>Add new book</h1>
2: <%= form_tag :action => 'create' %>
3: <p><label for="book_title">Title</label>:
4: <%= text_field 'book', 'title' %></p>
5: <p><label for="book_price">Price</label>:
6: <%= text_field 'book', 'price' %></p>
7: <p><label for="book_subject">Subject</label>:
annoying isn't it?! MIGHT IT BE A VERSION PROBLEM???
Sun Feb 21, 2010 7:13 pm |
Matt John Joined: 28 Sep 2009 Posts: 2 | I am glad that I was of help. I had been occupied by some extra stuff for last 2 weeks and hence I was not able to post part 2. But I will do it soon, so stay tuned. I have actually been trying to learn rails 1.x with my “new” agile development book and at the same time figure out the changes in 2.x. Your initiative for these tutorials are the best news since space cake.
Fri May 21, 2010 6:00 am |
TimSC Joined: 22 Jul 2010 Posts: 1 | Post Confirmation Thanks for your post. This post will be reviewed by webmaster and will be online very soon.!
Thu Jul 22, 2010 2:52 pm |
epuj Joined: 15 Sep 2010 Posts: 1 | Send Email using Rails 2.1 mistake in example http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-send-emails.htm def index render :file => 'app\views\emailer\index.htm.erb' end
should be
def index
render :file => 'app\views\emailer\index.html.erb'
end
Wed Sep 15, 2010 12:04 pm |
dill100 Joined: 21 Sep 2010 Posts: 1 | GREAT SITE Please use blackslash before opening square bracket becuase this is reserved to specifiy multiple search options.... So try the following and it won't give warning.. _________________ testking mcdba | testking mcdst
Tue Sep 21, 2010 8:30 am |

Display posts from previous: |

| Page 1 of 2 Goto page 1, 2 Next

You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum

Powered by phpBB © phpBB Group Design by Vjacheslav Trushkin for phpBBStyles.com