Paul Jonathan Thompson
2006-Apr-27 03:04 UTC
[Rails] ERb on he command line re: Ruby For Rails book
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
dblack@wobblini.net
2006-Apr-27 12:43 UTC
[Rails] ERb on he command line re: Ruby For Rails book
Hi -- On Thu, 27 Apr 2006, Paul Jonathan Thompson 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 (dblack@wobblini.net) 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 Bowkett
2006-Apr-27 17:30 UTC
[Rails] ERb on he command line re: Ruby For Rails book
for what it''s worth, I think Ezra Zyg. (he who does not sleep) was building a Rails-specific Ubuntu called Rubuntu. -- Giles Bowkett http://www.gilesgoatboy.org On 4/27/06, dblack@wobblini.net <dblack@wobblini.net> wrote:> Hi -- > > On Thu, 27 Apr 2006, Paul Jonathan Thompson 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 (dblack@wobblini.net) > 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! > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Paul Jonathan Thompson
2006-Apr-28 00:14 UTC
[Rails] ERb on he command line re: Ruby For Rails book
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>> endNameError: 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 On 28/04/06, dblack@wobblini.net <dblack@wobblini.net> wrote:> Hi -- > > On Thu, 27 Apr 2006, Paul Jonathan Thompson 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 (dblack@wobblini.net) > 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! > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
dblack@wobblini.net
2006-Apr-28 18:52 UTC
[Rails] ERb on he command line re: Ruby For Rails book
Hi -- On Fri, 28 Apr 2006, Paul Jonathan Thompson wrote:> 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 >>>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.> > Regards, > > Paul > > > On 28/04/06, dblack@wobblini.net <dblack@wobblini.net> wrote: >> Hi -- >> >> On Thu, 27 Apr 2006, Paul Jonathan Thompson 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 (dblack@wobblini.net) >> 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! >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- David A. Black (dblack@wobblini.net) 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 Thompson
2006-Apr-30 03:22 UTC
[Rails] ERb on he command line re: Ruby For Rails book
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 On 29/04/06, dblack@wobblini.net <dblack@wobblini.net> wrote:> Hi -- > > On Fri, 28 Apr 2006, Paul Jonathan Thompson wrote: > > > 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 > >>> > > 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. > > > > > Regards, > > > > Paul > > > > > > On 28/04/06, dblack@wobblini.net <dblack@wobblini.net> wrote: > >> Hi -- > >> > >> On Thu, 27 Apr 2006, Paul Jonathan Thompson 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 (dblack@wobblini.net) > >> 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! > >> _______________________________________________ > >> Rails mailing list > >> Rails@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -- > David A. Black (dblack@wobblini.net) > 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! > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >