Screencast Rails App From Scratch - Part 1 Ruby

  • Josh Van Cleef
  • 6021 views
Badge-student

Locked Content

A subscription is required for viewing this video. Enroll now to get full access to all Code School courses and content.

Enroll Now Sign in

Comments

  1. Diogo Vincenzi said

    I just watched this here at work. Extremely useful to see how the basic initial workflow of a rails app works. If I have some time to kill at home, I'll try and do the sample app. Can't wait to see part 2 :)

  2. aulia sabril said

    thank you ... and please continue the lesson...

  3. Joey said

    Great video! I loved the 'no fluff' pace. Can't wait for the next one.

  4. crippen said

    Great. Really loved the pace

  5. Adi said

    this was amazing. Can't wait for the next one.

  6. alan Maciel said

    Thank you, I really enjoy seeing someone crafting an app like that, workflow simple and swift! part 2 please!!

  7. Steve Castaneda said

    Thanks for this! Decided to run my scaffold generators with the --skip-stylesheets flag, because the default scaffolds css tends to screw with Bootstrap button stylings (in my experience).

    Did the extra code work you mentioned (activities) and spent some time making sure strings mentioning trips, destinations, and activities were links going to the appropriate resource.

    Looking forward to deploying in the next one!

  8. Joshua Beers said

    I am having trouble with this at the very beginning using the bootstrapper. I am on windows 7, and it seems that I can't use the twitter-bootstrap-rails gem due to conflicts between therubyracer gem and the libv8 gem. I seem to be able to do everything else in the tutorial just fine. My google search comes up with no real way to get around the therubyracer problem other than moving to a linux/mac os. Is there a possible workaround for the bootstrap?

  9. John McCaffrey said

    There has been a change to twitter-bootstrap-rails that requires some additional gems (less, therubyracer/execjs). To get the same experience as this tutorial, use the same version gem 'twitter-bootstrap-rails', '2.1.3'

    If you want to experiment with later versions, I would do so after getting everything else working.

  10. Student #86597 said

    Well done!

  11. Phillip said

    Really great! Thanks

  12. Tristan Smith said

    Just want to mention some bugs i ran into. After the setting of only: :index, the index page has issues with the destination_path (edit_path etc) as these routes no longer exist, you have to modify the index template to use trip_destination_path(destination.trip,destination) or [destination.trip,destination]

    Also due to the dependencies when you delete a trip things go awry with the destinations so modify to has_many :destinations, dependent: :destroy

  13. vjotov said

    Great video,

    But I have trouble executing the command on 02:27 - bundle install.

    I got the following error: C:\Sites\e3>bundle install Fetching source index for https://rubygems.org/ C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:54 :in stat': No such file or directory - C:/Documents and Settings/ф (Errno::ENOE NT) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_ fetcher.rb:54:ininitialize' ........

    I triple-checked that I have the folder "C:/Documents and Settings/ф" Foldername "Ф" is correct Cyrillic letter with ASCII code 0xAA (http://www.ascii-codes.com/cp855.html)

    What could you suggest for my case?

  14. vjotov said

    Hello again,

    for my case I put hard-code fix in C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb

    line 54 becomes:

    # @dir = File.join Gem.user_home, '.gem', 'specs'
    
    @dir = File.join 'C:\\RailsInstaller\\userfolder', '.gem', 'specs'
    
    #@update_cache = File.stat(Gem.user_home).uid == Process.uid
    
    @update_cache = File.stat('C:\\RailsInstaller\\userfolder').uid == Process.uid
    
  15. vjotov said

    C:\Sites\e3>bundle Fetching source index for https://rubygems.org/ Using rake (10.0.2) Using i18n (0.6.1) Using multi_json (1.3.7) Using activesupport (3.2.1) Using builder (3.0.4) Using activemodel (3.2.1) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.2) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.3) Using actionpack (3.2.1) Using mime-types (1.19) Using polyglot (0.3.3) Using treetop (1.4.12) Using mail (2.4.4) Using actionmailer (3.2.1) Using arel (3.0.2) Using tzinfo (0.3.35) Using activerecord (3.2.1) Using activeresource (3.2.1) Using bundler (1.0.22) Using coffee-script-source (1.4.0) Using execjs (1.4.0) Using coffee-script (2.2.0) Using rack-ssl (1.3.2) Using json (1.7.5) Using rdoc (3.12) Using thor (0.14.6) Using railties (3.2.1) Using coffee-rails (3.2.2) Using commonjs (0.2.6) Using jquery-rails (2.1.3) Using less (2.2.2) Using less-rails (2.2.6) Installing libv8 (3.3.10.4) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension .

        C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
    

    *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

    Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/RailsInstaller/Ruby1.9.3/bin/ruby Checking for Python...Unable to build libv8: Python not found!

    Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/libv8-3.3.10.4 for inspection. Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.3 .10.4/ext/libv8/gem_make.out An error occured while installing libv8 (3.3.10.4), and Bundler cannot continue.

    Make sure that gem install libv8 -v '3.3.10.4' succeeds before bundling.

  16. will barker said

    Good to see it all tying together after doing the rails 1 & 2 vids. Keep em coming!

  17. vjotov said

    For Windows fans, please read: http://stackoverflow.com/questions/9380838/ruby-on-rails-removing-a-dependency-while-installing-a-gem

    in Gemfile add: gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"

  18. Matt Payne said

    Great video. Thanks for making it.

    Would you please talk about how to get it running on heroku? I get a "ActionView::Template::Error" but am too new to fix it easily.

  19. Jeff Kamo said

    I am on Mountain Lion and ran in to a problem right when I ran

    rails new wandrr -d postgresql

    I received a nice fat error that basically said bundler had trouble dealing with a gem I think called pg. Long story short, make sure you install PostgreSQL via Homebrew and things will work better than using Postgres.app

    See here for more details: http://stackoverflow.com/questions/11711394/pg-gem-0-14-0-on-mountain-lion-fails

  20. Malachai Frazier said

    Heads up: If you're using ActiveAdmin, scaffolding will produce empty controllers that inherit from inherited_resources instead of ApplicationController. Put this in your config/application.rb and fix all the things: config.app_generators.scaffold_controller = :scaffold_controller

    https://github.com/josevalim/inherited_resources/issues/195

  21. Alberto Hernandez said

    waiting for part 2 and hope a part 3 too, thanks! very nice video!

  22. amul patel said

    this is awesome!! thanks for NOT doing ANY TEST DRIVEN DEVELOPMENT.

    TDD is great .. but it adds another LAYER of complexity and VIEWER FATIGUE.

    In fact for novices its just enough overhead to push them away...

  23. Grecoroman14 said

    Great video so far, but I'm having some trouble at 3:27 where you type 'rake db:migrate'. After it runs it then says 'rake aborted! fe_sendauty: no password supplied

    Tasks: TOP => db:migrate (see full trace by running task with --trace)'

    My database.yml file looks like this: development: adapter: postgresql encoding: unicode database: wandrr_development pool: 5 username: postgres password:

    Not really sure where to go from here. Any thoughts? Thanks

  24. Albert Pak said

    A quick update to this screencast would be nice, thank you John for mentioning that we'd need to use gem 'twitter-bootstrap-rails', '2.1.3' to follow this tutorial, since new updated gem has other dependencies.

  25. Martin Schubert said

    really looking forward to part 2! keep it coming ;-)

  26. Albert Pak said

    Anyone else got this error:

    NoMethodError in DestinationsController#create

    undefined method `destinations' for #Trip:0x007fcc79661c08

    I'm at the steps that are about 7:30 into this screencast...

  27. alan Maciel said

    We want the part 2!!!

  28. Roy said

    we're ready for part 2!

  29. Albert Pak said

    Definitely in need of part 2

  30. rmckinleys said

    very good... also ready for part 2!

  31. rmckinleys said

    My nav bar is covering up the

    Listing trips

    part of my index page. Would love some help on how to fix this problem.

  32. amul patel said

    Yo, bust out that Part 2....

  33. Phillip said

    p2? : ]

  34. Richard Lau said

    wow that bootstrap rails setup is awesome. thanks for the tips. a little bit too fast but i'll just hit reply a couple more times!

  35. Mike Henke said

    I am working on notes of the video, might be good in the resources https://gist.github.com/4660590

  36. Richard Lau said

    im having issues when I install bootstrap onto my app. I am on windows and this what I get cannot load such file -- less

  37. Richard Lau said

    FYI for anyone using windows. you can install the latest 'twitter-bootstrap-rails' gem but instead of just doing 'rails g bootstrap:install' you have to do "rails g bootstrap:install static'. This will install the default css files instead of the LESS files. You have less customization when you don't use LESS.

  38. tom netzband said

    For anyone running into some issues, here are some answers that worked for me: (btw, I'm on Mac OSX 10.7.5)

    ERROR: rake aborted errors / authentication failed for user wandrr: (I used homebrew to install postgres) - I had to jump into a new terminal window and add a new role for postgres. 1) in terminal, cd to your rails app directory 2) "$ psql -d postgres" to get into psql 3) then "postgres=# create role wandrr login createdb;" 4) then "postgres=# \q" to exit

    ERROR: Cannot load such file -- less Installing the less-rails gem and therubyracer gem fixes this. My gemfile order is:

    gem 'less-rails' gem 'therubyracer' gem 'twitter-bootstrap-rails'

    (you might only need therubyracer though, I had both because I'm a super noob) Save that to your Gemfile and then run "$ bundle" again from in terminal from within your rails app directory.

    Hopefully that helps some people out.

  39. Barry Gallagher said

    That was awesome! Thanks a lot. I didn't mind the pace at all; pausing/rewinding requires very little effort.

  40. Martin Nikolov said

    An excellet video. It helped me a lot. Hope we will see Part 2 soon.

  41. Miha Zelnik said

    I'm having problem with this error when i want to create new destination ActiveRecord::RecordNotFound in DestinationsController#create

  42. Zach said

    Absolutely none of this is useful. The pace is fine but every step breaks something and while he's off speeding ahead you have to spend tons of time trying to get it to magically duplicate what he does. Not to mention the time spent trying to work out Postgres (pointless for a demo app like this - I get that it's for deployment but it's far easier to just add pg to your Gemfile deploy group on deployment) and configure Twitter Bootstrap which doesn't work out of the box. (Like others have said use gem 'twitter-bootstrap-rails', '2.1.3' ).

    I love everything about code school, but I'm seriously disappointed by the quality of this screencast. Big waste of time.

  43. desnofre said

    too faaaaaaaaast. this is the fastest rails tutorial i've ever had.

  44. mikeadeleke said

    There are some problems I am having with Rails 4 where it keeps asking:

    Couldn't find Trip without an ID

    This seems to happen despite my following along precisely and for the second time. Have you updated for Rails 4?

  45. howiechan said

    Can someone post a solution for the db:migrate issue with postgres? (see comment by GRECOROMAN14 )

  46. jplindgren said

    Oh my god! Great tutorial if you just finished rails courses 1&2. Keep them coming! <3 <3 <3

  47. felipehangen said

    Nice quick roundup. Thanks.

  48. Raouf said

    Too fast and not useful for newbie . Seems like the video is edited to omit many steps because my code looks different every time.

  49. kimble9t said

    Wow, amazing!

  50. nicandro martinez said

    very very useful! I love how everything's put in there! I can take this app and add so many features, which I would do next.

    Thanks!

    Once more, CodeSchool going the extra mile!

  51. franciscodariem said

    Where is part 2?

  52. Renzo Ulloa said

    nice job!

  53. Manu said

    Where are other parts?? Rails App From Scratch 1, 2 ...

  54. thebatu said

    Part 2 ??

  55. Twerkle said

    gem "therubyracer" gem "less-rails" gem "twitter-bootstrap-rails"

    got it working for me without having to specify which version of bootstrap

  56. Tope Salami said

    I'm having an issue "Couldn't find Trip without an ID". See more on stackoverflow: http://goo.gl/EQuWX6 Can someone help please?

  57. Tope Salami said

    Solved the "Couldn't find Trip without an ID". Find solution here: http://goo.gl/EQuWX6

About This Screencast

We build an entire Rails application from scratch, showing you every single step in the process. Models, associations, nested routes, versioning, styling, validations and everything in-between.

This is the first part of an on-going series, we leave you on a code challenge you can attempt to complete before the next episode is published.

You need to be an enrolled student in order to view this video and subscribe.

Enroll Now