www.tutorialspoint.com Forum Index
Register FAQMemberlistUsergroupsTutorials PointLog in
Reply to topic Page 1 of 2
Goto page 1, 2  Next
Ruby on Rails - 2.1 Tutorial
Author Message
Reply with quote
Post 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.
View user's profile Send private message Send e-mail
Reply with quote
Post Post Confirmation 
Thanks for your post. This post will be reviewed by webmaster and will be online very soon.!

View user's profile Send private message
Reply with quote
Post  
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
Rolling Eyes

Thanks!

View user's profile Send private message
Reply with quote
Post  
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.
View user's profile Send private message Send e-mail
Reply with quote
Post  
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.

View user's profile Send private message
Reply with quote
Post  
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.

View user's profile Send private message
Reply with quote
Post  
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???

View user's profile Send private message
Reply with quote
Post  
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.

View user's profile Send private message Send e-mail
Reply with quote
Post Post Confirmation 
Thanks for your post. This post will be reviewed by webmaster and will be online very soon.!

View user's profile Send private message
Reply with quote
Post 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

View user's profile Send private message
Reply with quote
Post 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
View user's profile Send private message
Display posts from previous:
Reply to topic 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