Karmen Blake
Agile Developer and Instructor
Categories
- Courses (15)
Archives
- June 2008 (2)
- May 2008 (10)
- April 2008 (16)
- March 2008 (8)
- February 2008 (10)
- January 2008 (14)
- December 2007 (4)
- November 2007 (7)
- October 2007 (25)
Tags
- 206 (10)
- 234 (7)
- 282 (10)
- 283 (29)
- 284 (29)
- agile (1)
- announcements (10)
- articles (2)
- assignments (10)
- contest (1)
- employment (1)
- humor (5)
- linux (5)
- location (1)
- microsoft (1)
- office (1)
- preregistration (1)
- rails (4)
- ruby (14)
- scc (2)
- scripting (4)
- syllabi (3)
- syllabus (1)
- tips (1)
- unix (2)
- video (1)
- videos (7)
- web (2)
- windows (3)
Welcome!
You'll find my course content and collaborative discussion about technology.
I teach as an adjunct faculty in the Computer Information Systems department at Spokane Community College
Presentations/Interviews
RubyLearning.com interviewCourse Technology - Ruby on Rails Presentation
Starting a Rails App
April 11th, 2008 |
Concepts- ActiveRecord Basics
- Migration Basics
- Creating a controller and a view
- Download
- Unzip
- Navigate into folder and run
rake db:migrate ruby script/server
14 Responses to “Starting a Rails App”
Sorry, comments are closed for this article.
April 11th, 2008 at 02:29 PM Hey Karmen, All this is so COOL!!!! I get it man! I have one request, when you record could you change the resolution so that when you are working in the console it is more readable. The text is to small when viewed in the higher resolutions making it hard to catch the commands you are using. That would be so AWWWWESOME!!! Thanks, J
April 11th, 2008 at 03:02 PM Thanks. I also just noticed my transparency on my console background does not help for readability too. For next time, I'll enlarge font size and make my console background solid black.
April 12th, 2008 at 08:57 PM Karmen, great screen cast! I tried to unzip your rails app and had all kinds of problems. Inside each of the folders in the app there is the folder (that contains the stuff it should) and a "file" that is 0 kb with the same name. When I unzip, I only get the 0kb files. So, I went through and manually (folder by folder) copy and past the folders and files needed. Then I got the following error when I tried to run the ruby db:migrate command "rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/rake.rb:1849:in 'load_rakefile' (See full trace by running task with --trace)" I have no idea what that all means. I did verify that I have the rake-0.7.2 gem installed. I am running Vista and don't know if that is causing the problem.
April 13th, 2008 at 09:18 AM To all, can someone else report experience with zip file. If someone gets a good copy, can they put on a network drive at school. Thanks.
April 13th, 2008 at 10:36 AM I'm bringing it in for Sara. I could ask Lynn or Dave to put it on p drive.
April 13th, 2008 at 04:30 PM Angie, thanks! I appreciate the help.
April 14th, 2008 at 11:40 AM Thank you Angie. I ran a test today. I downloaded the zip file onto my H drive at SCC and was able to sucessfully unzip the file. So... looks like Vista is not very "unzip" friendly :(
April 14th, 2008 at 12:09 PM The unzipped folder is now on p drive, in Karmen's' folder, CIS 284, Spring 2008.
April 14th, 2008 at 03:34 PM Karmen, Adam showed me a cool way to view the screen casts so they almost fill the screen yet you don't have to go full screen....I can read the code know as you type it to the console.... COOL! Thanks Adam! (Click Menu, then click embedded and copy the URL from the pop up to the address bar in another tab in your browser,(hit enter and wait for it to load)). Works Slick! Jeff
April 14th, 2008 at 03:59 PM Jeff, I posted last quarter (http://webdev.scc.spokane.edu:3000/2008/2/19/comparable-lecture#comment-162) about viewing the videos in full screen. Oh gosh, I'm sorry to those trying to view videos not in full screen. Ouch, there's no way when condensed. So, Everyone, please watch videos in full screen. Whew. I hope people see this. There is an easy way to switch to full screen mode: in the upper-right hand corner of the video there is a 4-way arrows icon that can be clicked on. :)
April 19th, 2008 at 04:12 PM I imagine I just forgot something from previous terms but I can't understand the migrate script: create_table :stories do |t| t.string :url t.string :title t.string :description t.timestamps end the "do" is going to iterate through something, isn't it? Assigning each instance to t? But why would we go through this more than once? And what is t? Will we go through it once only, with t being set to "stories"? If so, what is stories?
April 20th, 2008 at 10:13 AM Warren, awwwhh, see that is why I wish I would have squeezed in an assignment on the Procs and Blocks that I covered at the of last quarter. The do |t| ... end is a block (anonymous function) that uses 't' an anonymous variable to do some work. It is not necessarily iterational. We are used to seeing blocks in iterative fashion (each, times, etc.). Blocks can be used for anything, such as migrations. It might help to review the Procs and Blocks information.
April 21st, 2008 at 07:27 PM Thanks for the hint. I found the section on procs in the 'Ruby for Rails' book. Interesting but not helpful. When I look at the migrate script I see no proc.new, no x.call. Can you talk me through what that thing is doing? What is 't'?
April 21st, 2008 at 09:29 PM Warren, so the proc.new and x.call is the stuff that happens when you define the method with a block. What we benefit from is just calling the block. The rails gurus did their metaprogramming tricks with the use of blocks to give us nice and easy to use syntax for creating and modifying database tables. 't' is an anonymous variable to be used temporarily for any local object to be referenced and used. This website is kind of a fun/silly way to learn about how blocks are used: http://blog.codahale.com/2005/11/24/a-ruby-howto-writing-a-method-that-uses-code-blocks/