Getting Really Started with Rails - Tutorial styled Slides A

For those that missed out joining the amazing turnout of ~70 people here
in
Vancouver for the mini-workshop I did on the 27th last month, I am
making
available the 30 slides I used for the presentation.

The slides were used in conjunction with me demonstrating it via command
line. Alot was learned by both attendees, and quite possibly even more
so by
myself while teaching the material.

I created the slides in a tutorial style, so although it helps if I were
to
guide you along, I really do try to do that within the slides
themselves. Be
warned, they are definately not the Takahashi style :slight_smile:

Hope you enjoy!

http://slidewheel.com/deck/show/12

Kind regards,

Nathaniel B.

Inimit Innovations Inc.
http://inimit.com

Dude… this rocks!

Nathaniel B. wrote:

guide you along, I really do try to do that within the slides
themselves. Be
warned, they are definately not the Takahashi style :slight_smile:

Hope you enjoy!

http://slidewheel.com/deck/show/12

A couple of points, one minor, the other more important:

  • on slide 2, you have “ActiveResource (soon) - SOAP”
    “SOAP” should be “REST”

  • on slide 10, you have
    “load http://0.0.0.0:3000/ in Firefox or Camino only”
    and you also use URLs with 0.0.0.0 on slides 20 and 28

You should point your browser at http://127.0.0.1:3000/
(or at http://localhost:3000/) - then you should find that any browser
works.

When you run script/server and Rails gives the message
“Rails application started on http://0.0.0.0:3000/
it is being a bit misleading. The server is serving on port 3000, and
the “0.0.0.0” means “on all network interfaces”.

A client should use a specific IP address, like 127.0.0.1.

The fact that some browsers work with 0.0.0.0 (and DHH uses this in his
screencast) just adds to the confusion.

regards

Justin

Thanks for the feedback, I have already modified the slides based on
your
recommendations.

-NSHB

On 8/12/06, Justin F. [email protected] wrote:

line. Alot was learned by both attendees, and quite possibly even more

and you also use URLs with 0.0.0.0 on slides 20 and 28
A client should use a specific IP address, like 127.0.0.1.
http://lists.rubyonrails.org/mailman/listinfo/rails


Kind regards,

Nathaniel B.

Inimit Innovations Inc.
http://inimit.com

Thanks David for the feedback :slight_smile:

One of the major missing areas of the mini-workshop was that of Ruby
itself.
Which I plan to cover in greater detail for the next full day workshop
on
the 1st.

-NSHB

On 8/11/06, David P. [email protected] wrote:

The slides were used in conjunction with me demonstrating it via command
Hope you enjoy!
http://inimit.com

David P.'s Ruby Playground
http://dppruby.com


Kind regards,

Nathaniel B.

Inimit Innovations Inc.
http://inimit.com

There is something wrong with the code on slide 14:

class Article < ActiveRecord::Base
def author_full_name
author_first_name + " " author_last_name
end
end

I’m getting a syntax error and not sure why but in radrails , the last
e in author_last_name is highligthed.
from console:

a=Article.new
SyntaxError: ./script/…/config/…/config/…/app/models/article.rb:4:
parse error, unexpected tIDENTIFIER, expecting kEND
from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
load' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:inload’ from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in
require_or_load' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:independ_on’
from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
require_dependency' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:inconst_missing’
from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing’
from (irb):1

Ooops …should be
author_first_name + " " + author_last_name

Dark A. wrote:

There is something wrong with the code on slide 14:

class Article < ActiveRecord::Base
def author_full_name
author_first_name + " " author_last_name
^ missing +
end
end

I’m getting a syntax error and not sure why but in radrails , the last
e in author_last_name is highligthed.

regards

Justin

Still getting an error:

a = Article.new
NameError: uninitialized constant Article from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
const_missing' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:inconst_missing’

Sorry for so many posts.

Stuart

Hey Stuart,

Fixed the bug with the missing “+” sign, but am unsure on what your
dependencie error is all about. From what I can see it almost looks as
if
the model “Article” isn’t being loaded for some reason.

Wonder if this is some wierd error with windows? Any chance you can
check
your code into a public SVN repository so I can review it? Or even, you
can
send me a TGZ of the whole Rails directory an email it off-list to nshb
(at)
inimit dot com

On 8/13/06, Justin F. [email protected] wrote:


Kind regards,

Nathaniel B.

Inimit Innovations Inc.
http://inimit.com

Hmm… is it “article.rb” or “Article.rb” ? I wonder if that makes a
difference.

You shouldn’t have to define it manually in the console. It should load
the
class automatically for you. My guess is your case is incorrect with the
filename as you mentioned, which would cascade an error like this.

-NSHB

On 8/14/06, Dark A. [email protected] wrote:

=> "Nathaniel B.

Wonder if this is some wierd error with windows? Any chance you can

There is something wrong with the code on slide 14:
e in author_last_name is highligthed.

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Kind regards,

Nathaniel B.

Inimit Innovations Inc.
http://inimit.com

Nathaniel,

Here is what I found regarding slide 14:

Where you create the definition for the full name method - I was short
an “end”.
However in this part, and I have gone beyond this slide yet:

In order to do this:

Loading development environment.

a = Article.new
=> #<Article:0x244301c @attributes={“author_last_name”=>nil,
“body”=>nil, “title”=>nil, “author_first_name”=>nil},
@new_record=true>

a.author_first_name = ‘Nathaniel’
=> “Nathaniel”

a.author_last_name = ‘Brown’
=> “Brown”

a.author_full_name
=> "Nathaniel B.

What I have found with script / console is I still need to define the
class and methods in console, otherwise I get an error. This is even
though it’s all in Article.rb. So I’m not sure if something is wrong
with my console or if that is just the way it works.
So, I’ll continue on and let you know if I run into any other snags.

Stuart