Week #7 Challenge: Ruby on Rails

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 9303 Views - Last Post: 21 February 2010 - 09:57 AM

#1 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2270
  • View blog
  • Posts: 9,496
  • Joined: 29-May 08

Week #7 Challenge: Ruby on Rails

Post icon  Posted 15 February 2010 - 03:14 PM

Introduce yourself to Ruby on Rails

Posted Image

Challenge: Introduce yourself to Ruby on Rails by creating a simple web application.

Rails is a framework for the Ruby programming language and is focused on MVC (Model-View-Controller) architecture for programming. After spending a few months learning and playing with Rails, and then returning to do some C++ programming, I realized how much Rails had affected me. My code was clearer and much more organized. I think we can all benefit by just introducing ourselves to Ruby on Rails. I challenge you to try out Rails and write a simple web application. (maybe use the Twitter API that you looked at in a previous challenge)

IDEAS
  • Create a small personal blog (very easy in Rails)
  • Create a number guessing game (always fun for learning a new language)
  • Create a web application that sends you an email (or anyone who enters an email address)
  • Create a user registration/authentication system (little more advanced, but still doable)


RESOURCES
One great way to learn Rails is just to start playing with it. Rails tries to take complicated ideas and make them easier with the tools it brings. If you're looking for information or help with your challenge, then I first suggest the Ruby programming forum right here on Dream.In.Code. You can also look at Railscast which has a plethora of screencasts for doing all sorts of cool stuff with Rails. Also, if you plan on doing the blog idea, here's a screencast of how to create one in 15 minutes with Rails. And of course, the Ruby on Rails Documentation.

HOW TO GET STARTED
Getting Rails set up to develop with is fairly easy and only requires downloading one or two things, depending on your OS.

Windows users have InstantRails, which quickly and painlessly gets you going. Here's a simple screencast on setting it up.

Apple ships their latest OS X releases with Ruby set up by default, but may need updating. Try the following commands in a Terminal window:

sudo gem update -system
sudo gem install rails


Once you get Ruby on Rails set up, you can create a project with the following command:

rails TestApp


You now have your basic Ruby on Rails application called TestApp set up with folders and everything. Test it out by going into the new TestApp directory and typing:

script/server

or
ruby script/server


This will start an internal web server to host the Rails web application. After it's running, point your browser to localhost:3000 to view the page.

Now let loose and see what Ruby on Rails has to offer you.

Thanks to Skaggles for submitting this challenge.

Is This A Good Question/Topic? 0
  • +

Replies To: Week #7 Challenge: Ruby on Rails

#2 anonymouscodder  Icon User is offline

  • member icon

Reputation: 126
  • View blog
  • Posts: 710
  • Joined: 01-January 10

Re: Week #7 Challenge: Ruby on Rails

Posted 15 February 2010 - 03:17 PM

I love the MVC thing.
Was This Post Helpful? 0
  • +
  • -

#3 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Week #7 Challenge: Ruby on Rails

Posted 15 February 2010 - 03:53 PM

Don't think I'll be doing this one. Vowed long ago to never touch rails, and I don't really do web development anyways. Great idea for a challenge. The web devs will get a kick out of this one.
Was This Post Helpful? 0
  • +
  • -

#4 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: Week #7 Challenge: Ruby on Rails

Posted 15 February 2010 - 04:08 PM

I've never used Rails, and I'm not a big web development person, but it's always interested me. Hopefully I can create something a little less shameful than my Haskell submissions.

This post has been edited by erik.price: 15 February 2010 - 04:08 PM

Was This Post Helpful? 0
  • +
  • -

#5 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Week #7 Challenge: Ruby on Rails

Posted 15 February 2010 - 04:23 PM

View Posterik.price, on 15 February 2010 - 03:08 PM, said:

I've never used Rails, and I'm not a big web development person, but it's always interested me. Hopefully I can create something a little less shameful than my Haskell submissions.


You did very good in a very short amount of time. They weren't shameful.
Was This Post Helpful? 0
  • +
  • -

#6 westforduk  Icon User is offline

  • D.I.C Head

Reputation: 24
  • View blog
  • Posts: 140
  • Joined: 16-August 07

Re: Week #7 Challenge: Ruby on Rails

Posted 15 February 2010 - 04:57 PM

Just attempted to watch that screencast that was linked, he goes so fast! Will maybe try and learn a different way, maybe text tutorials, they don't make my eyeballs bleed so much :lol:

Great challenge though, especially to those who attempted ruby.

This post has been edited by westforduk: 15 February 2010 - 04:57 PM

Was This Post Helpful? 0
  • +
  • -

#7 Skaggles  Icon User is offline

  • THE PEN IS MIGHTIER
  • member icon





Reputation: 251
  • View blog
  • Posts: 640
  • Joined: 01-March 09

Re: Week #7 Challenge: Ruby on Rails

Posted 15 February 2010 - 07:24 PM

I've got a new Windows system that I was trying to get setup to do Ruby on Rails development, but it's just a pain. I found a few guides that might be of help to people trying to do this challenge on a Windows-based system:

http://wiki.rubyonra...llation/windows
http://blog.mmediasy...ails-and-mysql/
http://blog.mmediasy...ls-and-sqlite3/
http://beans.seartip...indows-vistaxp/

Also, would it be cheating if I posted a link to a Rails application I've already done?

This post has been edited by Skaggles: 15 February 2010 - 07:49 PM

Was This Post Helpful? 0
  • +
  • -

#8 MRJ  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 118
  • Joined: 13-October 07

Re: Week #7 Challenge: Ruby on Rails

Posted 15 February 2010 - 07:52 PM

Just the excuse I needed to try rails. I've been doing some stuff with a PHP MVC Framework and I really liked it. It will be interesting to see what rails is like. I'll have to setup an application on my host and try it out. Now what to write.
Was This Post Helpful? 0
  • +
  • -

#9 Skaggles  Icon User is offline

  • THE PEN IS MIGHTIER
  • member icon





Reputation: 251
  • View blog
  • Posts: 640
  • Joined: 01-March 09

Re: Week #7 Challenge: Ruby on Rails

Posted 16 February 2010 - 04:04 AM

I uploaded this for a tutorial that I was working on, but I figured I'd link to it here for everyone to check out. It's a basic Rails application that just lets someone create, view, list, edit, and delete tasks in a RESTful way. Nothing too fancy, but it'll give an idea of how Rails applications look for those that have never touched Ruby on Rails before.

restful_tasks
Was This Post Helpful? 0
  • +
  • -

#10 Paul-  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 61
  • View blog
  • Posts: 260
  • Joined: 11-December 09

Re: Week #7 Challenge: Ruby on Rails

Posted 17 February 2010 - 11:57 AM

View PostRaynes, on 15 February 2010 - 02:53 PM, said:

Don't think I'll be doing this one. Vowed long ago to never touch rails, and I don't really do web development anyways.

Perhaps you should reconsider. The idea of the challenges is to try something unusual, different from what you normally do. Of course, if it involves breaking a sacred vow, that's another issue.
Was This Post Helpful? 0
  • +
  • -

#11 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: Week #7 Challenge: Ruby on Rails

Posted 17 February 2010 - 03:22 PM

The other thing you need if you want to get into Ruby on Rails is git and a github.com account. Almost all ruby/rails code is shared on github these days.

If you want to get up and running fast, you could try starting your rails application with a template. This project has a bunch of templates to try:
http://github.com/jm/rails-templates

Assuming you have rails/git installed, you can start a new project using one of those templates like so:


rails my_project -m http://github.com/jm/rails-templates/raw/master/suspenders.rb




This code is going to not only generate your app for you, but install a bunch of plugins, engines, and test code that will bootstrap your app. Check out the comments in the code to see what all it does.
Was This Post Helpful? 0
  • +
  • -

#12 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Week #7 Challenge: Ruby on Rails

Posted 17 February 2010 - 04:15 PM

View PostPaul-, on 17 February 2010 - 10:57 AM, said:

View PostRaynes, on 15 February 2010 - 02:53 PM, said:

Don't think I'll be doing this one. Vowed long ago to never touch rails, and I don't really do web development anyways.

Perhaps you should reconsider. The idea of the challenges is to try something unusual, different from what you normally do. Of course, if it involves breaking a sacred vow, that's another issue.


I don't like web development. I would not enjoy this challenge. I understand that the idea of the challenges is to move away from your comfort zone, but web-development isn't my thing. :\

And it is definitely a sacred vow.
Was This Post Helpful? 0
  • +
  • -

#13 Skaggles  Icon User is offline

  • THE PEN IS MIGHTIER
  • member icon





Reputation: 251
  • View blog
  • Posts: 640
  • Joined: 01-March 09

Re: Week #7 Challenge: Ruby on Rails

Posted 17 February 2010 - 05:27 PM

Made a fairly simple file upload management application for this challenge. You can find the code over at my github. I think I'm probably going to continue to work on this application even after this challenge is over.
Was This Post Helpful? 0
  • +
  • -

#14 Paul-  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 61
  • View blog
  • Posts: 260
  • Joined: 11-December 09

Re: Week #7 Challenge: Ruby on Rails

Posted 18 February 2010 - 08:56 PM

I spent more time on this one than I would have liked, with only modest results. The web is flooded with Ruby tutorials, but it is hard to find a good one, suitable for learning the basics. Most of them try to dazzle you with the speed with which you can cobble together a web application. The "blog in 15 minutes" video is a complete waste of time, which rushes by even if you watch it at half speed.

Of the tutorials I read, the most helpful was this one: http://articles.site...n-ruby-on-rails. It begins with an intro to Ruby, which you can skip if you did the week #5 challenge.

My conclusion from trying it for the first time is that Rails is an interesting framework, with intuitive tools to increase your productivity. I definitely like Ruby as a language. I would probably need a couple of months though, to be able to create anything useful.

So for the challenge I came up with a simple application composed of one controller and 2 views. It administers a personality test to the unsuspecting user. Be warned, you should not plan your future based on the result of the test!

Attached File  Personality.zip (100.2K)
Number of downloads: 269

This post has been edited by Paul-: 21 February 2010 - 09:08 PM

Was This Post Helpful? 0
  • +
  • -

#15 Skaggles  Icon User is offline

  • THE PEN IS MIGHTIER
  • member icon





Reputation: 251
  • View blog
  • Posts: 640
  • Joined: 01-March 09

Re: Week #7 Challenge: Ruby on Rails

Posted 19 February 2010 - 01:36 AM

Quote

So for the challenge I came up with a simple application composed of one controller and 2 views. It administers a personality test to the unsuspecting user. Be warned, you should not plan your future based on the result of the test!

Attachment Personality.zip


Awesome! I scored genius! :bananaman:
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2