Routes.rb - from Rails 2.x to Rails 3.x “How to Create a Blog from Scratch Using Ruby on Rails” tutorial



I'am working on "How to Create a Blog from Scratch Using Ruby on Rails" from http://sixrevisions.com. The tutorial was created for Rails 2.x. I try to get It working on Rails 3.x. . When I run server I and run localhost:3000 get some serious routing error:


Called from: C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.6/lib/ac
tion_dispatch/middleware/session/abstract_store.rb:28:in `initialize'.
Exiting
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing
/mapper.rb:185:in `default_controller_and_action': missing :action (ArgumentError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gem

View Replies

Related to : Routes.rb - from Rails 2.x to Rails 3.x “How to Create a Blog from Scratch Using Ruby on Rails” tutorial


How to Create a Blog from Scratch Using Ruby on Rails - from rails 2.x to 3.x - no visable comments
Category : Programming Languages

Im working with How to Create a Blog from Scratch Using Ruby on Rails tutorial from sixrevisions.com.


When I run server and create new post I have no visable option to add comment. According to tutorial I should be able to add end edit comments to created posts.


My comment


View Replies


What is the “Rails Way” to create the related row at the time the other row is created in Ruby on Rails
Category : Programming Languages

I have two tables: Lessons and Pages


lessons "has_many" pages
pages "belongs_to" lessons

When a new lesson is created I want the first page to be created at the same time.
The first page will have:


the lesson_id column equal to the newly created lessons id

View Replies


How out of date is the “blog tutorial” video on the ruby on rails website?
Category : Programming Languages

Hay, with the release of Ruby on Rails 3 soon, I thought I'd dive back into a bit of Ruby on Rails programming. I missed out version 2 of rails and had only previously been using 1.2


So i hopped on the video tutorial and worked through it. I just wanted to know how out of date is the


View Replies


What's the use of “get” routes “rails generate controllers” created in routes.rb in rails?
Category : Programming Languages

When creating a new controller post in rails with command rails generate controllers post, routes started with get will be inserted into the top of routes.rb automatically like below:


get "posts/index"
get "posts/new"
get "posts/create"

View Replies


“/#action” Route in Routes.rb in Ruby on Rails
Category : Programming Languages

How can I create a route of this format (in Ruby on Rails routes.rb file):


/#action/id

Specifically with the "#" character inserted before the action controller...for example, see http://lala.com/#album/some-album-id


thanks!


View Replies


Rails console won't load, “Could not find gem 'rails (= 3.0.0.beta3) ruby”
Category : Programming Languages

I typed in Rails console to begin working and received the error below:


MacBook-Pro:blog agreiner$ rails console
/Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'rails (= 3.0.0.beta3) ruby' in the gems a

View Replies


How can I make my Ruby on Rails 2.3.4 application “Rails 3-ready”
Category : Programming Languages

I'm developing an application with Ruby on Rails that I want to maintain for at least a few years, so I'm concerned about the next version coming up soon.


Going from Rails 1 to Rails 2 was such a big pain that I didn't bother and froze my gems and let the application die, alone, in th


View Replies


Ruby/Rails - delayed_job Rails.env is “development” when I'm in production
Category : Programming Languages

I'm running Ruby 1.9.2/Rails 3.0.9.


I am using the collective idea fork of delayed_job


I am starting delayed_job like so:
RAILS_ENV=production script/delayed_job start


It pulls jobs from my production database.


However, when proces


View Replies


rails-installer.sh runs fine but ruby, irb, rails command “not found” (UB12.04)
Category : Programming Languages

I ran rails-installer.sh on ubuntu 12.04. The scripts reports that ruby and gems and rails all installed without problem.


However, when I try:


ruby -v
rails -v
etc.

They all report "command not found".


I am new to linux... what


View Replies


Ruby on Rails: Using a “complete_tasks_controller” for RESTful Rails
Category : Programming Languages

I'm having troubling completing a task the RESTful way. I have a "tasks" controller, and also a "complete_tasks" controller.


I have this in the complete_tasks_controller create action:


def create
@task = Task.find(params[:id])
@task.completed_at = Time.n

View Replies


2012 / 2017 Copyrights BigHow , All Rights Reserved .