Forum: Ruby on Rails ERb on he command line re: Ruby For Rails book

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Paul Jonathan T. (Guest)
on 2006-04-27 07:07
(Received via mailing list)
Hi,

I am working thru the Ruby for rails book. On page 30 David Black
talks about running erb from the command line i.e. $ erb erbdemo.rb
just as you would a normal ruby prog ($ ruby erbdemo.rb) but when I
try to do this I get command not found. How do I make this work? I am
running Linux (Ubuntu Breezy)

Regards,

Paul
unknown (Guest)
on 2006-04-27 16:44
(Received via mailing list)
Hi --

On Thu, 27 Apr 2006, Paul Jonathan T. wrote:

> Hi,
>
> I am working thru the Ruby for rails book. On page 30 David Black
> talks about running erb from the command line i.e. $ erb erbdemo.rb
> just as you would a normal ruby prog ($ ruby erbdemo.rb) but when I
> try to do this I get command not found. How do I make this work? I am
> running Linux (Ubuntu Breezy)

It might depend how you installed Ruby.  Is it possible that Ubuntu
bundles erb separately in a different package?


David

--
David A. Black (removed_email_address@domain.invalid)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" PDF now on sale!  http://www.manning.com/black
Paper version coming in early May!
Giles B. (Guest)
on 2006-04-27 21:30
(Received via mailing list)
for what it's worth, I think Ezra Zyg. (he who does not sleep) was
building a Rails-specific Ubuntu called Rubuntu.

--
Giles B.
http://www.gilesgoatboy.org
Paul Jonathan T. (Guest)
on 2006-04-28 04:17
(Received via mailing list)
David,

I am getting this when I attempt to run the code from CH 2 of your
book. Can you advise please?

Loading development environment.
>> class MainController < ApplicationController
>>
?>   def welcome
>>   @composers = Composer.find(:all).sort_by {|c| [c.last_name,
c.first_name] }>>   end
>> end
NameError: uninitialized constant ApplicationController
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
`const_missing'
        from (irb):1
>>

Regards,

Paul
unknown (Guest)
on 2006-04-28 23:20
(Received via mailing list)
Hi --

On Fri, 28 Apr 2006, Paul Jonathan T. wrote:

> c.first_name] }>>   end
>>> end
> NameError: uninitialized constant ApplicationController
>       from
> 
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
> `const_missing'
>       from (irb):1
>>>

I'm really not sure what could be behind that other than for some
reason the application_controller.rb file being missing on your
system, or maybe some kind of very obscure version mismatch in the
Rails setup.  Is application_controller.rb there?


David

P.S. I'm in London at the moment and not as constantly online as I
usually am, but will be checking in at least periodically.

>>
>>
>> Rails mailing list
>> removed_email_address@domain.invalid
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

--
David A. Black (removed_email_address@domain.invalid)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" PDF now on sale!  http://www.manning.com/black
Paper version coming in early May!
Paul Jonathan T. (Guest)
on 2006-05-03 21:10
(Received via mailing list)
Hi David,

Thank you for your efforts. I am in Auckland, New Zealand so we are a
180 deg out of sinc.

I sorted out the problem by starting the exercise again and things
came right. So it was most likely finger problems.

On a new context, if you can spare a moment I need to achieve the
following and I do not have much time to do it in (Unfortunately I
have only just discovered your book and I am working from the pdf
while I await the hard copy which I ordered on Friday).

I have two tables and they have a one to many relationship I want to
display the contents in a browser. Parent with its children beneath
it. How do I do this. I am a rails (and Ruby nuby, as you already
know) so am pretty ignorant. Sorry to be making such a nuisance of my
self.

Regards,

Paul
This topic is locked and can not be replied to.