Hi,
Yeah great to be getting started with Ruby. Thanks for the feedback
Jan. I''ve been playing around with the todo tutorial, but then trying
to mix that in with the AddressBook tutorial. I''m trying to get two
projects started to find out if it is possible to run two projects at
the same time. At the moment, I have to shut the WEBrick server down
and restart from the directory of the project I am currently working
on. So for example if I start the server for AddressBook, then todo
gets a "Routing Error, recognition failed for "/todo/".
Is that correct? Or have I setup the directories incorrectly?
Thanks a lot,
Todd
On Nov 5, 2005, at 1:00 PM,
rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org wrote:
> Send Rails mailing list submissions to
> rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.rubyonrails.org/mailman/listinfo/rails
> or, via email, send a message with subject or body ''help''
to
> rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>
> You can reach the person managing the list at
> rails-owner-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Rails digest..."
>
>
> Today''s Topics:
>
> 1. Re: Looking for directions (Jan Prill)
> 2. Re: Keeping the queries down... (Eric Anderson)
> 3. access to url arguments, Ruby on rails CGI? (jimchris)
> 4. Re: Extend ActionView with custom tags (James Adam)
> 5. Re: Time based fragment expiry (Stefan Kaes)
> 6. Re: access to url arguments, Ruby on rails CGI? (Jan Prill)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 05 Nov 2005 15:19:21 +0100
> From: Jan Prill <JanPrill-sTn/vYlS8ieELgA04lAiVw@public.gmane.org>
> Subject: Re: [Rails] Looking for directions
> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> Message-ID:
<436CBF69.5010201-sTn/vYlS8ieELgA04lAiVw@public.gmane.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Dear, C.T.,
>
> great to have you here. I think the first thing you need to understand
> is, that the WEBrick that you start from within one project naturally
> only accesses said project. The URL that you address are processed from
> the controllers of the project. So have a look at the files in
> RAILS-ROOT/app/controllers. Within these controllers you might define
> methods or find the methods that are already defined. The most simple
> URLs then get resolved as: http://[your host]:3000/[controller-name
> without ''_controller'']/[method name within that
controller]. So if you
> get something on http://localhost:3000/todo you should find a
> app/todo_controller.rb which seems to have a index-method that gets
> called.
>
> The best way to learn RoR seems to be the excellent Book Agile Web
> Development with Rails which you will find at amazon:
> http://www.amazon.com/gp/product/097669400X/104-3422997-0824719?
> v=glance&n=283155&n=507846&s=books&v=glance
> . Then you''ll find plenty of documentation at
> http://documentation.rubyonrails.com/ . Why don''t you work through
for
> example something like Curt Hibbs tutorials:
> http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html . That should
> give you an idea how to set ruby on rails and covers multiple tables
> and
> relations between them as you have asked for.
>
> regards
> Jan Prill
>
> tmatsumoto wrote:
>
>> Hello,
>>
>> I''m new to Ruby and Rails and I am looking for some advice on
where to
>> look to answer some basic questions. Perhaps you could help me out.
>>
>> 1. I''ve installed Ruby and Rails and I''m going
through different
>> tutorials, but a problem persists in that I can only access one
>> project at a time. I can get access to the project by restarting the
>> WEBrick server in the directory of the chosen project I want to view,
>> after that http://localhost:3000/todo can be seen but if I try the
>> localhost:3000/addressbook I get an error message
>>
>> 2. The error message is "Recognition failed for
"/addressbook". As far
>> as I can see both projects are set up the same way. But one difference
>> that I noticed was, in the case of my first tutorial todo created a
>> test database with a mirrored table called todos, and addressbook did
>> not create a test table.
>>
>> 3. Finally, working from the tutorial that works, this example is
>> based on one table. Where can I find documentation about multiple
>> tables and join tables?
>>
>> Thanks a lot.
>>
>> C.T. Matsumoto
>>
>> _______________________________________________
>> Rails mailing list
>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 05 Nov 2005 09:27:12 -0500
> From: Eric Anderson <eric-ANzg6odk14w@public.gmane.org>
> Subject: [Rails] Re: Keeping the queries down...
> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> Message-ID: <dkifgb$h3c$1@sea.gmane.org>
> Content-Type: text/plain; charset="windows-1252"
>
> Luke Randall wrote:
>> @foo = Foo.find_by_name(''Baz'', :include => :bars,
:conditions =>
>> ''bars.name LIKE ''%C'')
>
> This is great. I didn''t know I could use eager associations in
this
> way.
>
>> You can look under eager loading in
>> ActiveRecord::Associations::ClassMethods for more details.
>
> I looked at this documentation and I saw this:
>
> ****** START DOCS *******
>
> Please note that limited eager loading with has_many and
> has_and_belongs_to_many associations is not compatible with describing
> conditions on these eager tables. This will work:
>
> Post.find(:all, :include => :comments, :conditions =>
"posts.title > ''magic forest''", :limit => 2)
>
>
> but this will not (and an ArgumentError will be raised):
>
> Post.find(:all, :include => :comments, :conditions =>
"comments.body
> like ''Normal%''", :limit => 2)
>
> ******* END DOCS ********
>
> But it doesn''t say why this is the case. It looks like they should
both
> work!
>
> Eric
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 187 bytes
> Desc: OpenPGP digital signature
> Url :
> http://wrath.rubyonrails.org/pipermail/rails/attachments/20051105/
> 66a15a78/signature.bin
>
> ------------------------------
>
> Message: 3
> Date: Sat, 5 Nov 2005 10:32:10 -0500
> From: "jimchris"
<jimchris-MM/j/dhsNyiaMJb+Lgu22Q@public.gmane.org>
> Subject: [Rails] access to url arguments, Ruby on rails CGI?
> To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> Message-ID:
>
<B885B471EDA5604A9BA75B8DF5D2FABA62C1-VFEpKrDcEDdsI1Jb3+tCcDrdsNE2EIMJXqFh9Ls21Oc@public.gmane.org>
> Content-Type: text/plain; charset="us-ascii"
>
>
>
> Hello leaders,
>
> My first project. A helpdesk ticket processing webapp.
>
> This is one kick butt environment to pplay/work in!
>
> Our clients launch a ticket with a URL that has text bearing data we
> prefer to capture rather than have them enter.
>
> As in http://helpticket.company.com?users=john,computer=room101
> <http://helpticket.company.com/?users=john,computer=room101>
>
> I see how form data is handled but not how ''CGI''
arguments are.
>
> My toolkit is "Agile Development with Rails". Running on XP RC3
using
> webricks.
>
> This is one kick butt environment to pplay/work in!
>
> Thanks for any and all suggestions.
>
> Jim
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://wrath.rubyonrails.org/pipermail/rails/attachments/20051105/
> c6570d43/attachment.html
>
> ------------------------------
>
> Message: 4
> Date: Sat, 5 Nov 2005 14:40:25 +0000
> From: James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Subject: Re: [Rails] Extend ActionView with custom tags
> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> Message-ID:
>
<9ec5d0aa0511050640j5353dbcmf259ccf5aa062baa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
> Content-Type: text/plain; charset=ISO-8859-1
>
> You don''t really need to add the function to ActionView::Helpers -
all
> you need to do is either put it in your
> /app/helpers/application_helper.rb file, and the method will be
> automatically made available to all your views.
>
> Alternatively, define the method in a module, say, /lib/foo_helper.rb:
>
> module FooHelper
> def foo_tag
> ...
> end
> end
>
> and then include this module in your ApplicationHelper:
>
> module ApplicationHelper
> include FooHelper
> end
>
> On 11/5/05, Pete <pertl-BA+cFGlbTmA@public.gmane.org> wrote:
>> Hi #{pluralize(person)},
>>
>> Does some know how to add custom tag helpers to ActionView?
>>
>> Something like:
>>
>> module ActionView::Helpers::FooHelper
>> def foo_tag
>> "<foo bar=4711/>"
>> end
>> # ...
>> end
>>
>>
>> so you can use foo_tag inside an .rhtml like:
>>
>> ...
>>
>> <%= foo_tag %>
>>
>> ...
>>
>> Thanks in advance!!
>>
>> Regards
>> Peter
>> _______________________________________________
>> Rails mailing list
>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
> ------------------------------
>
> Message: 5
> Date: Sat, 05 Nov 2005 15:45:20 +0100
> From: Stefan Kaes <skaes-hi6Y0CQ0nG0@public.gmane.org>
> Subject: Re: [Rails] Time based fragment expiry
> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> Message-ID: <436CC580.8020200-hi6Y0CQ0nG0@public.gmane.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Gavin Montague wrote:
>
>> Hello all,
>> I''m using cached fragments to provide feeds from flickr,
>> delicious etc and want these feeds to be updated on site specific
>> times, for example - "If the fragment from flickr is more than
24
>> hours old refresh it", "If the fragment from delicious is
more than
>> 30 minutes old refresj it"
>>
>> Ideally, I don''t want to use a cron job to monitor them
because I
>> can''t help but feel that''s a slighly inelegant
solution. To my mind
>> the details about the fragments expiry should be linked to it quite
>> tightly.
>>
>> The best solution I''ve been able to come up with is.....
>>
> I can''t see anything wrong with periodically exipring from the
command
> line. Especially with the expiration intervals given as examples above.
> Checking for expired fragments on each request, will ... slow down
> your app.
>
> -- stefan
>
>
> RailsExpress Blog: http://railsexepress.de/blog
>
>
>
> ------------------------------
>
> Message: 6
> Date: Sat, 05 Nov 2005 15:47:31 +0100
> From: Jan Prill <JanPrill-sTn/vYlS8ieELgA04lAiVw@public.gmane.org>
> Subject: Re: [Rails] access to url arguments, Ruby on rails CGI?
> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> Message-ID: <436CC603.20102-sTn/vYlS8ieELgA04lAiVw@public.gmane.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi, Jim,
>
> try:
>
> params[:users] and params[:computer]
>
> regards
> jan Prill
>
> jimchris wrote:
>
>>
>>
>> Hello leaders,
>>
>> My first project. A helpdesk ticket processing webapp.
>>
>> This is one kick butt environment to pplay/work in!
>>
>> Our clients launch a ticket with a URL that has text bearing data we
>> prefer to capture rather than have them enter.
>>
>> As in http://helpticket.company.com?users=john,computer=room101
>> <http://helpticket.company.com/?users=john,computer=room101>
>>
>> I see how form data is handled but not how ''CGI''
arguments are.
>>
>> My toolkit is "Agile Development with Rails". Running on XP
RC3 using
>> webricks.
>>
>> This is one kick butt environment to pplay/work in!
>>
>> Thanks for any and all suggestions.
>>
>> Jim
>>
>> ----------------------------------------------------------------------
>> --
>>
>> _______________________________________________
>> Rails mailing list
>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>>
>
>
>
> ------------------------------
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
> End of Rails Digest, Vol 14, Issue 89
> *************************************
>