Showing posts with label Ruby on Rails. Show all posts
Showing posts with label Ruby on Rails. Show all posts

Sunday, November 30, 2008

undefined method 'scaffold' - Ruby on Rails error

When I first got the error undefined method 'scaffold' I was so frustrated because I was new to Ruby on Rails and was following a tutorial. After some search on the net I found out that method scaffold is no longer supported in Rails 2.0 and above.
Tutorials out there in the net really need to be updated because newcomers are stuck when they get errors in the tutorial it self.

Get Free Sinhala IT Learning Videos Kuppiya.com


Get custom programming done at GetAFreelancer.com!

Friday, November 28, 2008

Ruby on Rails quick guide with InstantRails

Lets get started quickly on Ruby on Rails basics with InstantRails, First we'll see how to add a new Rails application using InstantRails ruby console.

1) Start up your InstantRails.

2) Right Click the InstantRails system tray icon and goto Rails Applications -> Open Ruby Console Window

3)you will be in rails_apps folder(default) in the command line.

4)type rails my_new_site on the command line

This will create a new my_new_site rails application inside the rails_apps folder, all the files needed will be created for you as well, just navigate to your rails_apps folder and view newly created my_new_site folder.



5) now lets start our web server to run our newly created RoR application using the command line

6) type cd my_new_site (change directory to my_new_site)

7) type ruby script\server
Now your web server is started and you can run your new application.




8) open a browser and type http://localhost:3000/ in the navigation bar.



To learn how to install InstantRails click here

Get custom programming done at GetAFreelancer.com!

Thursday, November 27, 2008

How to install Ruby on Rails - Instant Rails - All in one Package

If you are going to learn Ruby on Rails (RoR), Instant rails will make your RoR installation much more easier, like WAMP Server for php, Instant Rails is all in one package containing Ruby, Rails, Apache, and MySQL. All the things have been configured for you that you only need download and unzip the Instant Rail folder to your C: drive.

1) Download Instant Rails from here Download the latest zip file (InstantRails-2.0-win.zip when I write this)

2)Unzip the Instant Rail into C:\InstantRails

3)Double click the InstantRails.exe (Icon with big red I)

4)Now InstantRails system tray icon will run on you Taskbar

5)To see if all went well, Right Click the InstantRails system tray icon and goto Rails Applications -> Open Ruby Console Window



6)Type ruby --version in the opened command line window, then you will get the installed ruby version.

OK that's it. In my next blog post I will cover some basics when working with InstantRails for your RoR development.

Get Free Sinhala IT Learning Videos Kuppiya.com


Get custom programming done at GetAFreelancer.com!