[Rails] Microsoft Visual Studio 2010 Ultimate With Serial (New Update)
*Microsoft Visual Studio 2010 Ultimate With Serial (New Update)* http://rapidlinks007.blogspot.com/2010/05/microsoft-visual-studio-2010-ultimate.html http://rapidlinks007.blogspot.com thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Visual Studio 2010 and NET Framework 4 Training Course
*Visual Studio 2010 and NET Framework 4 Training Course http://rapidlinks007.blogspot.com/2010/05/visual-studio-2010-and-net-framework-4.html * *http://rapidlinks007.blogspot.com* http://rapidlinks007.blogspot.com thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: get data from has_and_belongs_to_many + has_many
On 20 May 2010 16:59, Sharagoz shara...@gmail.com wrote: On May 20, 4:13 pm, Michael Pavling pavl...@gmail.com wrote: You need to iterate over a's bs [1] collection, and return the related cs. I don't think that is necessary. It should be possible to get the data in a single sql query. @cs = C.all(:joins = {:b = :as}, :conditions = {'as.id = 1'}) If you don't have any info apart from a_id (in params, maybe), then yes, go query the DB in one hit. But if you already have your 'a' eager-loaded with all its related bs and cs, then there's not much sense in rebuilding a load of objects; you might as well just select them out of the collections you have in memory. Depends on your starting point. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Re: Re: nill object error
On 20 May 2010 23:37, Ravi Dtv li...@ruby-forum.com wrote: ... Can you please solve this error for me undefined method `each' for 4:Fixnum I am sure you can work it out for yourself. Look at the line of code that generates the error, presumably there is a call to 'each' there. The error says that you are trying to call each for the value 4 (which is of type Fixnum), presumably you expected it to be an Array. If you can't see the problem by code inspection use ruby-debug to break in before that line and have a look at the variable you are calling each on. Colin -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Easy custom validation messages on a per-attribute basis
When i do this: validates_presence_of :name, :email, :message = Can't be blank and use the error_message_on method in my view, i get the same message for both name and email fields - Can't be blank. How do i specify a different message for each attribute without having to write a custom validation message? Passing a hash to the :message parameter would be great but it doesn't work: validates_presence_of :name, :email, :message ={:name = 'name message', :email = 'email message'} Any thoughts? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Segmentation fault
Ruby 1.8.7 (2010-01-10 patch level 249) Rails 2.3.5 mySQl 5.1 I am trying to build a very simple application accessing a single table in mySQL. Have updated database.yml. The listing view is ok. But when I am trying to add a record, I am getting Segmentaion fault at different .rb file each time. Can someone please help ? Thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Strange error in unit test = TypeError: wrong argument type Class (expected Module)
On May 21, 12:15 am, vfr292 vfr...@gmail.com wrote: Hi, Well, I have have continued to work on this, but with no luck. The error pops up for every test I run for every model and controller (not just the test1 model). What does your test case look like ? It looks like you're writing a test for a view helper, is that view helper a class rather than a module ? Fred Any ideas? ~Victor -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Basic question on RoR, the Web, and Browsers
On May 21, 2:23 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: Ralph Shnelvar wrote: Marnen Laibow-Koser wrote: I have no idea how to have the server sit on an unfulfilled Ajax (or any other) request. Good. You don't want to. What you may be looking for is Comet (essentially Ajax over a persistent HTTP connection), but that's really hard to do AFAIK. You probably don't want to do it in rails but it's not too hard - where I work we wrote a c++ daemon to handle long polling requests, but there are already things like http://orbited.org/ or http://www.ape-project.org/ that handle the heavy lifting Fred Best, -- Marnen Laibow-Koserhttp://www.marnen.org mar...@marnen.org -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Printed/PDF Reports (Text/Tabular/Summary) in Rails
I just started using Prawn. It's in alpha but it's already pretty usefull. Table lay-outs neatly reproduce themselves over multiple pages with repeating headers. And that just in 1 line of code!!! Jan On May 21, 12:54 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: Jeremy Cowgar wrote: [...] Any suggestions? I have used FOP in the past and there is no way it's powerful enough for some of the things we do. In some synarios, we really had to push the limits of ReportLab (and sometimes confined by them). I doubt extremely that FOP isn't powerful enough. FO can handle just about any layout you'd care to throw at it. But its syntax is pretty awful. I'd suggest looking at one of the many Ruby PDF libraries or a tool like wkhtmltopdf. Thanks! Jeremy Best, -- Marnen Laibow-Koserhttp://www.marnen.org mar...@marnen.org -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Paperclip Processor Not Working
Did you ever get this working? I'm having the exact same issue. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Basic question on RoR, the Web, and Browsers
Probably. Push is hard to impossible with Web technologies, unless you use Java or maybe Flash. But you can certainly poll for updates with Ajax, which is no different on the server side than just hitting reload repeatedly in the browser. I had this idea ... tell me what's wrong with it. http://en.wikipedia.org/wiki/Web_Sockets Regards, Rimantas -- http://rimantas.com/ -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] mongrel having lot of sockets in close wait state
Hi, I have a rails webapp and lately one of the mongrel process gets stuck in close_wait state and my app stops responding and needs a restart. I have a apache in front of mongrel processes and the close wait state on connection seems to be on localhost only (My guess is it is apache). Any help appreciated on how should i go about debugging this issue. Thanks, Sivakumar. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: REXML, rake aborted! Text is not a module
Switched from REXML to nokogiri. Any solution at this point is purely academic... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Rails vs Grails
On 20 May 2010 13:38, egervari ken.egerv...@gmail.com wrote: To the OP: you think an underscore looks like an *operator*? What operator does it look like? What are you in danger of confusing it with? Part of the problem for me is that I really can't see well. this-that and this_that kind of look the same to me. You might want to try to change the font in your editor to one that is designed to be easy to differentiate similar characters. Personally, I use ProFont Tweaked [1], but Sheldon is good too. [1] http://www.tobias-jung.de/seekingprofont/ There is a linux version, but I just have the Windows TFF installed in Ubuntu -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Rails vs Grails
On 21 May 2010 09:58, Michael Pavling pavl...@gmail.com wrote: TFF TTF silly fingers :-/ -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Authlogic: Authenticate with login, password and type fields
Hi guys, How can we check *type* field in addition of *login* and *password* fields, before saving a new UserSession with Authlogic? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] What happens when Rails 1.3.5 is installed on top of 2.3.5?
On a Mac running Snow Leopard, the Rails version was 2.3.5 (by using rails -v) and then I used gem install to install about 20 things, and maybe there was a line on the instructions that was there in the past that says gem install rails -v=1.3.5 and I ran it anyways, thinking that maybe 1.3.5 is a different version number... and it installed 5 gems (as i remember). Will that actually affect the current rails? Even after the installation, when I use rails -v it still says 2.3.5 and also if it is gem list rails it would list something like rails (2.3.5, 2.3.2, 1.3.5) so looks like they exist nicely with each other without affecting one another? thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: No default .htaccess
On May 21, 2:49 am, Simon Che li...@ruby-forum.com wrote: Hey all! I just created my first RoR project (following this guidehttp://wiki.rubyonrails.org/start), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I simply didn't had any .htaccess in my public/ folder. People around the interwebz seemed to imply there should be one by default, so my questions are : You don't need a .htaccess in public for passenger (in fact with an older app that I migrated to passenger recently, the old .htaccess was there stopped passenger from working). It was removed because it was only used for fastcgi which is pretty much obsolete as a method for deploying rails apps Fred - Why wasn't there one created with my application? - Also, I didn't have any problem when I ran my application using webrick. How come? Thanks. -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?
On May 21, 10:44 am, Jian Lin li...@ruby-forum.com wrote: On a Mac running Snow Leopard, the Rails version was 2.3.5 (by using rails -v) and then I used gem install to install about 20 things, and maybe there was a line on the instructions that was there in the past that says gem install rails -v=1.3.5 and I ran it anyways, thinking that maybe 1.3.5 is a different version number... and it installed 5 gems (as i remember). Will that actually affect the current rails? Even after the installation, when I use rails -v it still says 2.3.5 and also if it is gem list rails it would list something like rails (2.3.5, 2.3.2, 1.3.5) so looks like they exist nicely with each other without affecting one another? thanks. Yup, rubygems is designed to handle that sort of thing. Installed executables (eg the rails executable that sets up a new app) will run the latest version), you can run older versions by doing (for example) rails _1.3.5_ anoldapp The fiddly stuff is when the old version of rails doesn't cope with the version of ruby you have, eg rails didn't handle ruby 1.8.7 before 2.1 (I think, could be a different version but you get the idea) or uses functionality that was deprecated and later removed in newer versions of rubygems. Fred -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] DISTINCT field name dosen't give the expected output
i used the bellow code to collect the lyrics which are related to particular album and display under the album name. Lyric.find(:all,:select='DISTINCT album_name,title,id,singers',:conditions= [album_name LIKE ?, params[:id] + %]) But the above sql query is not works for me the below query is working but this query only returns the album_name not the other fields. Lyric.find(:all,:select='DISTINCT album_name',:conditions= [album_name LIKE ?, params[:id] + %]) is there any way to do this in rails or sql? advise please. thanks in advance. nirosh -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] action mailer noob
Hi guys, a noob in rails here I did some searching on the net about how to send email to diffrent domain adresses like google, yahoo and stuff..and the guides that i found were a bit more confusing. for example at this adress http://guides.rails.info/action_mailer_basics.html the last two examples Action Mailer Configuration, Action Mailer Configuration for GMail The thing is that they are so diffrent...and if i wanna send mails to yahoo, or hotmail or whatever, what should i do? but before al this, if i wanna send a small mail on my mac, just to see how this action mailer stuff works, is there something i should change in my app? a million thx in advance, radu -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] action mailer noob
Hi guys, a noob in rails here I did some searching on the net about how to send email to diffrent domain adresses like google, yahoo and stuff..and the guides that i found were a bit more confusing. for example at this adress http://guides.rails.info/action_mailer_basics.html the last two examples Action Mailer Configuration, Action Mailer Configuration for GMail The thing is that they are so diffrent...and if i wanna send mails to yahoo, or hotmail or whatever, what should i do? but before al this, if i wanna send a small mail on my mac, just to see how this action mailer stuff works, is there something i should change in my app? a million thx in advance, radu -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] action mailer noob
Hi guys, a noob in rails here I did some searching on the net about how to send email to diffrent domain adresses like google, yahoo and stuff..and the guides that i found were a bit more confusing. for example at this adress http://guides.rails.info/action_mailer_basics.html the last two examples Action Mailer Configuration, Action Mailer Configuration for GMail The thing is that they are so diffrent...and if i wanna send mails to yahoo, or hotmail or whatever, what should i do? but before al this, if i wanna send a small mail on my mac, just to see how this action mailer stuff works, is there something i should change in my app? a million thx in advance, radu -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] downloading .pdf file
Hi, I know how to get a .html file and writing contents into a file in the server. eg. doc = Nokogiri::HTML(open(http://projectmadurai.org;).read) my_file = File.new(pm.html, w) my_file.puts doc.inner_html my_file.close I want to download a .pdf file in a similar way. How can I achieve this? -- -- Nandri(Thanks in Tamil), Amala Singh -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: DISTINCT field name dosen't give the expected output
On May 21, 11:32 am, nirosh kunalan.kand...@gmail.com wrote: i used the bellow code to collect the lyrics which are related to particular album and display under the album name. Lyric.find(:all,:select='DISTINCT album_name,title,id,singers',:conditions= [album_name LIKE ?, params[:id] + %]) But the above sql query is not works for me the below query is working but this query only returns the album_name not the other fields. Lyric.find(:all,:select='DISTINCT album_name',:conditions= [album_name LIKE ?, params[:id] + %]) is there any way to do this in rails or sql? advise please. thanks in advance. Distinct applies to the entire row (I'm guess you expected it to just make the album_name distinct). You might try group by album_name - while the standard says that if you do a group by you can't put non grouped by columns in the select clause (except of course when using them with an aggregate function like SUM), some databases let you do this anyway. If so then (for example) the title would be the title of one of the grouped rows, but with no guarantee as to which one. it may not even be the case that if you had two such columns they would be taken from the same row - experiment and look at the documentation for you database Fred -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Re: Re: Rendering a partial on a two column page
Thanks Rob!!! It worked PERFECTLY. Thanks again for you help! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] undefined method `each' for 4:Fixnum
Quoting Ravi Dtv li...@ruby-forum.com: undefined method `each' for 4:Fixnum How can I solve this error. What are you trying to do? 'each' is usually applied to an array, a hash, or a range. It doesn't make sense for a Fixnum. Do you want irb(main):001:0 4.times{|i| puts i} 0 1 2 3 = 4 irb(main):002:0 or: irb(main):002:0 (2..4).each{|i| puts i} 2 3 4 = 2..4 irb(main):003:0 HTH, Jeffrey -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Survey on Open-Source Technologies: Questionnaire on RoR
[Apologies for cross-posting] Hi everybody, I am part of the Spatial Information Systems Group in University College Dublin. Our goal is to collect first-hand knowledge about a number of Open- Source projects active on the Internet. With this work we hope to identify strong and weak points of each project in order to give some guidelines for future directions to the Open-Source community and developers. Therefore we would like to ask you to take an anonymous questionnaire on Ruby On Rails. Estimated completion time: about 1 minute Link to the questionnaire: http://bit.ly/geospatial-opensource-survey-rubyonrails Survey Home page: http://bit.ly/geospatial-opensource-survey Projects included in this survey: GeoServer, MapServer, PostGIS, MySQL, Hibernate, Hibernate Spatial, Ruby on Rails, Grails, Proj.4, GeoTools, Java Topology Suite, OpenLayers, Ext JS, Prototype, MooTools Feel free to contact us at andrea.ballatore [at] ucd.ie if you have any questions, comments and recommendation about this survey. Thank you for your attention, Spatial Information Systems Group, School of Computer Science and Informatics, University College Dublin -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Easy custom validation messages on a per-attribute basis
You'll have to separate you attributes: validates_presence_of :name, :message = Your name error here validates_presence_of :email, :message = Your e-mail error here On May 20, 3:32 pm, Marcelo marcel...@gmail.com wrote: When i do this: validates_presence_of :name, :email, :message = Can't be blank and use the error_message_on method in my view, i get the same message for both name and email fields - Can't be blank. How do i specify a different message for each attribute without having to write a custom validation message? Passing a hash to the :message parameter would be great but it doesn't work: validates_presence_of :name, :email, :message ={:name = 'name message', :email = 'email message'} Any thoughts? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: action mailer noob
HI , First you need to decide how you want to send emails from a rails app or what options are available. 1. Sendmail : Its a program or application which handles mail delivery. 2. SMPT Server: Either you can set up your own or use third party service like (gmail/yahoo etc) Check this link : http://railstutor.org/projects/1/wiki/Actionmailer Answering to second part of your question, what i understood is you wan to test how an email looks when it is actually sent out in other words you wan to test the same. Check on CREATE_ and DELIVER_ methods of actionmailer. regards, Bharath On May 21, 3:43 pm, radu puspana radupusp...@gmail.com wrote: Hi guys, a noob in rails here I did some searching on the net about how to send email to diffrent domain adresses like google, yahoo and stuff..and the guides that i found were a bit more confusing. for example at this adresshttp://guides.rails.info/action_mailer_basics.html the last two examples Action Mailer Configuration, Action Mailer Configuration for GMail The thing is that they are so diffrent...and if i wanna send mails to yahoo, or hotmail or whatever, what should i do? but before al this, if i wanna send a small mail on my mac, just to see how this action mailer stuff works, is there something i should change in my app? a million thx in advance, radu -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] How to override generated named route helpers?
Hey, where exactly are these methods defined? I'd like to use alias_method to set some parameters before calling the original methods. Cheers, Szymon -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: DISTINCT field name dosen't give the expected output
yes works great the query now i use is SELECT * FROM lyrics WHERE movie_name like 'a%' GROUP BY Movie_name -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: No default .htaccess
Frederick Cheung wrote: On May 21, 2:49�am, Simon Che li...@ruby-forum.com wrote: Hey all! I just created my first RoR project (following this guidehttp://wiki.rubyonrails.org/start), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I simply didn't had any .htaccess in my public/ folder. People around the interwebz seemed to imply there should be one by default, so my questions are : You don't need a .htaccess in public for passenger (in fact with an older app that I migrated to passenger recently, the old .htaccess was there stopped passenger from working). It was removed because it was only used for fastcgi which is pretty much obsolete as a method for deploying rails apps Fred Okay... then let me describe the issue I had with passenger (and not with webrick), I guess the problem lies elsewhere : in the 'First application' part of the wiki, you create a table and the correspondent controller and views. I just can't access this controller, I get an error 500 from apache. Furthermore, when I checked the log, I get this : [Thu May 20 21:07:08 2010] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. [Thu May 20 21:07:08 2010] [debug] core.c(3063): [client 127.0.0.1] r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-uri = /users Also, here's what I've got in my apache configuration : NameVirtualHost 127.0.0.1:3000 Listen 127.0.0.1:3000 VirtualHost 127.0.0.1:3000 DocumentRoot /home/simon/projet-web/blog/public DirectoryIndex index.html LogLevel debug RailsEnv development Directory /home/simon/projet-web/blog/public AllowOverride All Options -MultiViews /Directory /VirtualHost Thanks again! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: List of radio buttons
On 21 Maj, 00:19, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Thu, May 20, 2010 at 2:46 PM, Smok mariusz_waszc...@tlen.pl wrote: I need to create in RoR 2.3.5 alistof questions ( the number of questions will be changing). The answers will be near to each of the these questions in radiobuttons (let's say 3 radios near each of thequestions). After having compleated all of these questions I would like to read all the answers and using ONE update insert them to the database(mySQL). Is it possible to create this functionality without js? Of course. You're describing a basic form. Why would you think you need JavaScript to submit it and process the data? Or am I misunderstanding your goal? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan Thanks Hassan for your answer. However I don't know how to define the radiobuttons (in such a way that a different answer can be checked for different questions). And I don't know how to read all the user's answers. Could you try to paste a bit of code? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Basic question on RoR, the Web, and Browsers
Ralph Shnelvar wrote: (2) The client issues an asynchronous request (perhaps, an XHR) which gets fulfilled when the server detects that there has been a change in some player's data. Impossible. That means the server will block till it has new data, which means the client will be stuck, waiting for a response from the server. Or do you mean that the client simply polls periodically, and if the server has no new data, it just says so? Why would the client block? It's an asynchronous request. Isn't that the point of an asynchronous request ... not to block? You're right, my mistake. However, there's one other thing you should be aware of. Unless something has changed recently, most browsers allow only a fairly small number of simultaneous HTTP connections. Having a persistent server connection will tie up one of those slots. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Help with relations
Hello I have the three database models: seller, client and account. A seller may have many clients and many accounts, but I would like to add the constraint that given a seller and a client, only one account may exist between them. Is there a way to express this contraint using ActiveRecord relations? Thanks in advance, Andre -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Validates_presence_of fails on observer
Hi, I missed on line in the second block of code: def update_user_points_and_votes_count(vote, factor) content_clazz = Kernel.const_get(vote.voteable_type) #missing content = content_clazz.fin(vode.voteable_id) content.vote_count +=1*factor content.save! ... ... end Thank you On Fri, May 21, 2010 at 12:47 AM, Jonhy Pear jonhy.p...@gmail.com wrote: Hi, I have the following model that uses the plugin act_as_voteable: class Video ActiveRecord::Base belongs_to :user acts_as_voteable acts_as_commentable attr_accessible :url, :title, :description, :vote_count validates_presence_of :url, :title, :description ... end I also have an observer for Vote model, so each time a user cast a vote to a video, or other content, I will update some info, including the vote_count on video model or other content. The code that runs each time a vote is created is: def update_user_points_and_votes_count(vote, factor) content_clazz = Kernel.const_get(vote.voteable_type) content.vote_count +=1*factor content.save! ... ... end Basically, I will update vote_count when a vote is casted to a video, or other kind of content that act_as_voteable. The problem is that the instruction content.save! raises a validation exception on :url (in the list of validates_presence_of). I think that it will fail also on the other attributes in the list of validates_presence_of. What I'm missing? thank you, Jp -- João Miguel Pereira http://jpereira.eu LinkedIn: http://www.linkedin.com/in/joaomiguelpereira joaomiguel.pere...@gmail.com (351) 96 275 68 58 -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Validates_presence_of fails on observer
Hi, I missed on line in the second block of code: def update_user_points_and_votes_count(vote, factor) content_clazz = Kernel.const_get(vote.voteable_type) #missing content = content_clazz.fin(vode.voteable_id) content.vote_count +=1*factor content.save! ... ... end Thank you On Fri, May 21, 2010 at 12:47 AM, Jonhy Pear jonhy.p...@gmail.com wrote: Hi, I have the following model that uses the plugin act_as_voteable: class Video ActiveRecord::Base belongs_to :user acts_as_voteable acts_as_commentable attr_accessible :url, :title, :description, :vote_count validates_presence_of :url, :title, :description ... end I also have an observer for Vote model, so each time a user cast a vote to a video, or other content, I will update some info, including the vote_count on video model or other content. The code that runs each time a vote is created is: def update_user_points_and_votes_count(vote, factor) content_clazz = Kernel.const_get(vote.voteable_type) content.vote_count +=1*factor content.save! ... ... end Basically, I will update vote_count when a vote is casted to a video, or other kind of content that act_as_voteable. The problem is that the instruction content.save! raises a validation exception on :url (in the list of validates_presence_of). I think that it will fail also on the other attributes in the list of validates_presence_of. What I'm missing? thank you, Jp -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Help with relations
andre...@gmail.com wrote: Hello I have the three database models: seller, client and account. A seller may have many clients and many accounts, but I would like to add the constraint that given a seller and a client, only one account may exist between them. Is there a way to express this contraint using ActiveRecord relations? Yes -- validates_uniqueness_of will do the trick -- but never rely solely on ActiveRecord constraints. You need a unique index (and foreign key constraints) on the DB side too. Thanks in advance, Andre Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: List of radio buttons
Smok wrote: On 21 Maj, 00:19, Hassan Schroeder hassan.schroe...@gmail.com wrote: need JavaScript to submit it and process the data? Or am I misunderstanding your goal? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan Thanks Hassan for your answer. However I don't know how to define the radiobuttons (in such a way that a different answer can be checked for different questions). And I don't know how to read all the user's answers. Could you try to paste a bit of code? No, first learn about HTML form syntax (hint: the name attribute is significant here) and read the Rails documentation. If that doesn't work, show us what you've done so far and what problems you're having. Asking for code without doing your homework first will usually get you ignored here. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: List of radio buttons
On Fri, May 21, 2010 at 8:25 AM, Marnen Laibow-Koser li...@ruby-forum.com wrote: No, first learn about HTML form syntax (hint: the name attribute is significant here) Heh. Beat me by a minute :-) I was going to suggest that the OP has apparently never read this http://www.w3.org/TR/html401/interact/forms.html and that it'd be an excellent place to start... -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: rails example projects
rails mentors has not provided any leads to work with someone id like to reopen the question again: are there any example sites on github to study as best practices? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Toronto-Based Company Looking for System Administrator
Hello all: I am writing on behalf of Nanos Research, a premier market and public opinion research organization located in Toronto, ON. You can find more information about our company at http://www.nanosresearch.com. Using quantitative and qualitative research as well as eConsultation strategies, we conduct various public opinion research and polls. Currently, our Toronto office is looking for a System Administrator who is knowledgeable in Ruby programming language. We run various eConsultation websites that are based on Ruby, and because they are necessary to meet the needs of our clients, it is important that these websites run smoothly and efficiently. We are looking for an experienced individual in Ruby programming who is able to provide immediate technical support and monitoring of our eConsultation websites. It is not necessary for you to work in our office, but we are looking for someone residing in Toronto. If you are interested in this position, please contact me by e-mail at kalin...@hotmail.com. I am not able to reveal compensation information at this point, but please let me know if you have your own personal fee requirements. Thanks very much, Best, Alexandra -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: rails example projects
I think that this http://github.com/assaf/ruby-in-practice can help you. Greetings. 2010/5/21 dan mr.dan.ma...@gmail.com rails mentors has not provided any leads to work with someone id like to reopen the question again: are there any example sites on github to study as best practices? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.comrubyonrails-talk%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- *Mi Twitter http://twitter.com/distriker *Blog personal http://distriker.co.cc *Fundador del proyecto IMGBeta *Twitter oficial de IMGBeta http://twitter.com/imgbeta *Webmaster del proyecto http://hispaturismo.com *Webmaster de http://rincon-blogger.blogspot.com -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Multiple Models one form and validations ... no transactions(mongo)
I am trying to setup a sigup form thats pretty much just like the basecamp form. https://signup.37signals.com/basecamp/Plus/signup/new I want to create a User a Studio and a Subscription(chargify) a Subscription belongs to a Studio and not to a User. User gets tagged onto a Studio via an admin array. Is there any way to do this all in one form and still get back validation errors etc without using a transaction to roll everything back? Right now i have the problem where if the User gets created but then the Studio or Subscription fails I then have a User sitting in the db when the form re-renders new and they click save again then they will get a error about username already exists blah blah blah. Right now i am creating everything via the User model with all the extra fields on attr_accessor and a method called create_and_subscribe. Is that the best practice for this? and if so how do i still get back the validations from the other model like Studio. Since i don't have transactions the best i could think of was this at the head of create_and_subscribe def create_and_subscribe(product_id) studio = Studio.new(studio_params) return unless self.valid? studio.valid? . . end that way i at least know they are valid then i actually create them if the call to Chargify is successful. Thanks for any help this has been driving me nuts. Ps.I wonder if this is better suited to the mongo form since my problem is coming from lack of transactions? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] set a title attribute for the text field inside rails form
Hi I am trying to set title attribute for the text filed inside a form using rails. I tried %= f.text_field :email , :class = autoclear,:title = title %/ p but it did not work I want it to produce this HTML input type=text title=title size=30 name=user[email] id=user_email class=autoclear -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Help with relations
On May 21, 12:20 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Yes -- validates_uniqueness_of will do the trick -- but never rely solely on ActiveRecord constraints. You need a unique index (and foreign key constraints) on the DB side too. I am already using the validations and key constrains. I was actually wondering about the possibility of having Active Record generate helper methods reflecting that kind of relation. Thanks, Andre -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: set a title attribute for the text field inside rails form
On May 21, 4:56 pm, Mohammed Alenazi vb4...@gmail.com wrote: Hi I am trying to set title attribute for the text filed inside a form using rails. I tried %= f.text_field :email , :class = autoclear,:title = title %/ p but it did not work I want it to produce this HTML What did it produce ? Fred input type=text title=title size=30 name=user[email] id=user_email class=autoclear -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Rake aborted ! while runing the migrations
I got the solution simple put the line require 'test/unit' in that file as first line... :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Designing An Application (UML, Class Diagrams)
Hi Is there any freeware anybody would recommend for showing database models and how they relate to each other? I'm picking up an app another developer left in a mess and I'm trying to sort it out. Diagrams would be a great help. Suggestions? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Designing An Application (UML, Class Diagrams)
On 21 May 2010 21:11, sso strongsilent...@gmail.com wrote: Hi Is there any freeware anybody would recommend for showing database models and how they relate to each other? I'm picking up an app another developer left in a mess and I'm trying to sort it out. Diagrams would be a great help. Suggestions? http://railroad.rubyforge.org/ -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Designing An Application (UML, Class Diagrams)
I second that - railroad rocks - it's basically automatic On May 21, 3:33 pm, Michael Pavling pavl...@gmail.com wrote: On 21 May 2010 21:11, sso strongsilent...@gmail.com wrote: Hi Is there any freeware anybody would recommend for showing database models and how they relate to each other? I'm picking up an app another developer left in a mess and I'm trying to sort it out. Diagrams would be a great help. Suggestions? http://railroad.rubyforge.org/ -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Designing An Application (UML, Class Diagrams)
Michael Pavling wrote: On 21 May 2010 21:11, sso strongsilent...@gmail.com wrote: Hi Is there any freeware anybody would recommend for showing database models and how they relate to each other? �I'm picking up an app another developer left in a mess and I'm trying to sort it out. Diagrams would be a great help. Suggestions? http://railroad.rubyforge.org/ I had thought Railroad was abandoned and didn't work with recent versions of Rails, but I hope I'm wrong -- it's a great tool. For figuring out DB structure, I recommend SchemaSpy. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Help with relations
On 21 May 2010 15:49, andre...@gmail.com andre.nat...@gmail.com wrote: Hello I have the three database models: seller, client and account. A seller may have many clients and many accounts, but I would like to add the constraint that given a seller and a client, only one account may exist between them. Is there a way to express this contraint using ActiveRecord relations? Does Client belongs_to seller, and Account belongs_to seller? If so then you could put client and account together in one table. Alternatively have Client has_one account and Account belongs_to client, or the other way round. This doesn't work if you have HABTM relationship of course. Colin -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Designing An Application (UML, Class Diagrams)
On 21 May 2010 21:52, Marnen Laibow-Koser li...@ruby-forum.com wrote: Michael Pavling wrote: http://railroad.rubyforge.org/ I had thought Railroad was abandoned and didn't work with recent versions of Rails, but I hope I'm wrong -- it's a great tool. It worked for me this morning with 2.3.5 (although I do occasionally have to tweak models to get it to parse them happily) -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How to override generated named route helpers?
Szymon Nowak wrote: Hey, where exactly are these methods defined? I'd like to use alias_method to set some parameters before calling the original methods. They're defined by the map.resources calls in routes.rb. You could probably alias them anytime after that file is executed...but why? You can set parameters when you define them. What are you trying to accomplish? Cheers, Szymon Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] rendering in csv file
I have an index page showing a table of network hosts with IP addresses, roles, hostname etc. Is it trivial to render that page to the browser as a csv file instead of html and link to that rendering on the index page? How is that done? Is there a nice rails csv rendering for dummies page? Thanks in advance, -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Routes :requirments
I want to set a route :requirements on an array that verifies a particular parameter is included in an array. Something to the effect of: pre atypes = [:culture, :personality, :communication] map.with_options(:path_prefix = ':atype', :requirements = {:atype = atypes.include?(:atype)}) do |assessment| ... end /pre I haven't been able to find any documentation on how to accomplish this. Any help would be appreciated. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] OpenID Authentication using AuthLogic
Hi, I am trying to implement openid authentication using authlogic. I have installed the open_id_authentication in the process but when I entered rake open_id_authentication:db:create --trace I get the following error (in /Users/felix/login) rake aborted! Don't know how to build task 'open_id_authentication:db:create' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1728:in `[]' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `top (required)' /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19:in `main' Can someone tell what am i doing incorrectly Thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] SUMO, GSoC like project, to create sustainable software
Hi, I am Jean-christophe Kermagoret from SIDE-Labs. SIDE-Labs, founded by BlueXML, is an open source project which created a sustainable IDE, SIDE, based on MDA (Model Driven Architecture), to quickly develop sustainable software application. Moreover, thanks to the use of models, development can be achieved by domain specialist. From a technological point of view, a generation process enables to build the corresponding application on available frameworks. Alfresco ECM is already available as a final technical target, and more frameworks should be available soon. I think it could be a good opportunity for RoR to provide its own implementation. I know, if I want something, just write the code :-) But I only have 2 hands. So, SIDE-Labs created the SUMO project, GSoC like, which stipends students to develop models and code. A SUMO project could be, for example, to develop this alternate generator. It could be interested for Django community to have access to Alfresco or other one. Moreover, all the available applications could be available in the future on the RoR platform. In fact, we are trying to build the next Babel Tower. If you think you can be interested by such a project, have a look at http://www.side-labs.org/wiki/index.php/SUMO:Home, read FAQ, browse projects' list and create a page for your ideas as a mentor organization, or a student. Feel free to ask for information on the forums and/or subscribe mailing lists. Thanks for your time and your interest, JC -- Jean-Christophe Kermagoret Directeur associe BlueXML 40, bd Jean Ingres 44100 Nantes Tel. : +33.2.40.46.62.78 Mob. : +33.6.08.56.83.80 BlueXML : http://www.bluexml.com SIDE-Labs : http://www.side-labs.org KerBlue : http://www.kerblue.org -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Routes :requirments
On May 21, 2010, at 3:13 PM, Chris Kilmer wrote: I want to set a route :requirements on an array that verifies a particular parameter is included in an array. Something to the effect of: pre atypes = [:culture, :personality, :communication] map.with_options(:path_prefix = ':atype', :requirements = {:atype = atypes.include?(:atype)}) do |assessment| ... end /pre I haven't been able to find any documentation on how to accomplish this. Any help would be appreciated. :requirements = {:atype = /culture|personality|communication/} I believe the right hand side of any requirement has to be a regexp... -philip -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: set a title attribute for the text field inside rails form
it ignores the :title for some reason input type=text size=30 name=user[email] id=user_email class=autoclear On May 21, 8:12 pm, Frederick Cheung frederick.che...@gmail.com wrote: On May 21, 4:56 pm, Mohammed Alenazi vb4...@gmail.com wrote: Hi I am trying to set title attribute for the text filed inside a form using rails. I tried %= f.text_field :email , :class = autoclear,:title = title %/ p but it did not work I want it to produce this HTML What did it produce ? Fred input type=text title=title size=30 name=user[email] id=user_email class=autoclear -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: set a title attribute for the text field inside rails form
You've got something mucking with your output. Maybe a plugin or a form builder? On a clean Rails 2.3.5 app with the following view % @foo = Foo.new % % form_for @foo do |f| % %= f.text_field :name, :title = 'my title' % % end % ... gives me this... input id=foo_name name=foo[name] size=30 title=my title type=text / -philip On May 21, 2010, at 3:28 PM, Mohammed Alenazi wrote: it ignores the :title for some reason input type=text size=30 name=user[email] id=user_email class=autoclear On May 21, 8:12 pm, Frederick Cheung frederick.che...@gmail.com wrote: On May 21, 4:56 pm, Mohammed Alenazi vb4...@gmail.com wrote: Hi I am trying to set title attribute for the text filed inside a form using rails. I tried %= f.text_field :email , :class = autoclear,:title = title %/ p but it did not work I want it to produce this HTML What did it produce ? Fred input type=text title=title size=30 name=user[email] id=user_email class=autoclear -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] [Newbie question] How does map.root?
Hello, I am very ill and I don't remember how does map.root. I have this in the routes.rb: ruby code ActionController::Routing::Routes.draw do |map| map.signup 'signup', :controller = 'users', :action = 'new' map.logout 'logout', :controller = 'sessions', :action = 'destroy' map.login 'login', :controller = 'sessions', :action = 'new' map.resources :sessions map.resources :users map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' map.root :controller = 'index', :action = 'index' end /ruby code And the controller is app/controllers/index.rb and it have the class Index and the def Index. This is the code: ruby code class Index ActiveRecord::Base def Index end end /ruby code If I put this in my rails project, say me this the localhost: quote We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly. /quote Can someone explain me how does the map.root? Thanks for your attention. Greetings -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] activerecord-postgresql-adapter
Hello guys, here I am back with another problem I want to run postgresql as db and I guess I installed all the required gems gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.0.beta3, 2.3.5) actionpack (3.0.0.beta3, 2.3.5) activemodel (3.0.0.beta3) activerecord (3.0.0.beta3, 2.3.5) activeresource (3.0.0.beta3, 2.3.5) activesupport (3.0.0.beta3, 2.3.5) arel (0.3.3, 0.2.pre) authlogic (2.1.3) builder (2.1.2) bundler (0.9.25) erubis (2.6.5) ffi (0.6.3) i18n (0.3.7) mail (2.2.1, 2.1.5.3) memcache-client (1.8.3, 1.7.8) mime-types (1.16) pg (0.9.0) polyglot (0.3.1) rack (1.1.0, 1.0.1) rack-mount (0.6.3, 0.4.7, 0.4.0) rack-test (0.5.3) rails (3.0.0.beta3) rails3b (3.0.1) railties (3.0.0.beta3) rake (0.8.7) ruby-pg (0.7.9.2008.01.28) rubygems-update (1.3.7) sqlite3-ruby (1.2.5) SystemTimer (1.2) text-format (1.0.0) text-hyphen (1.0.0) thor (0.13.6) treetop (1.4.5) tzinfo (0.3.20) Here is the runtime error I got after starting the server[under About your application's environment] using command (~$rails server) Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (no such file to load -- pg) I am on Rails 3 with Postgresql -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] XMLHttpRequest and Rails
Is there a simple example of me issuing an XMLHttpRequest and a rails app responding ... without all the Prototype overhead. All I want to do is send an XHR and have the Rails app deliver an XML document back. I have searched ... Does anyone nkow of a decent example? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: XMLHttpRequest and Rails
Ralph Shnelvar wrote: Is there a simple example of me issuing an XMLHttpRequest and a rails app responding ... without all the Prototype overhead. What are you considering overhead? XHR *is* fundamentally a JavaScript function... All I want to do is send an XHR and have the Rails app deliver an XML document back. I would suggest using JSON instead of XML. I have searched ... Does anyone nkow of a decent example? There's virtually nothing Rails-specific or Ajax-specific here. To the server, receiving an XHR is just like receiving any other request. What don't you understand here? Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] XMLHttpRequest and Rails
Hi Ralph, On Fri, May 21, 2010 at 7:09 PM, Ralph Shnelvar li...@ruby-forum.comwrote: Is there a simple example of me issuing an XMLHttpRequest and a rails app responding ... without all the Prototype overhead. All I want to do is send an XHR and have the Rails app deliver an XML document back. I have searched ... Does anyone nkow of a decent example? Depending on the UI element you want to use to trigger the ajax request, check out the rails documentation for: link_to_remote button_to_remote form_remote_for form_remote_tag Each helper will generate the appropriate Ajax request, using Prototype as a default. Rails does the coding for you. Check back if you have questions specific to one of those once you decide which is most appropriate for your situation. HTH, Bill -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] activerecord-postgresql-adapter
On Fri, May 21, 2010 at 6:57 PM, Siva Kilaru li...@ruby-forum.com wrote: Hello guys, here I am back with another problem I want to run postgresql as db and I guess I installed all the required gems Not according to the error message ;-) Here is the runtime error I got after starting the server[under About your application's environment] using command (~$rails server) Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (no such file to load -- pg) As a first step, try doing as instructed. gem install activerecord-postgresql-adapter If that doesn't work check back with more info. Best regards, Bill -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: XMLHttpRequest and Rails
Bill Walton wrote: Hi Ralph, Each helper will generate the appropriate Ajax request, using Prototype as a default. Rails does the coding for you. Check back if you have questions specific to one of those once you decide which is most appropriate for your situation. Ok ... I need to do polling of the server. The polling will happen out of jQuery ... so there is no UI trigger event as such. Once I get my results back, I'll use jQuery to manipulate the DOM to pupulate certain fields ... as indicated by the XML returned. Where I am getting confused is what on the server side picks on the request? What on the server side sends back status codes 1, 2, 3, and 4? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: XMLHttpRequest and Rails
Hi Ralph, On Fri, May 21, 2010 at 8:27 PM, Ralph Shnelvar li...@ruby-forum.comwrote: I need to do polling of the server. Then use the periodically_call_remote helper The polling will happen out of jQuery ... Doesn't really matter which library you're using. The Rails helper will generate the call you need. so there is no UI trigger event as such. Right. Once I get my results back, I'll use jQuery to manipulate the DOM to pupulate certain fields ... as indicated by the XML returned. Why? Rails will generate the html, probably a partial, that you need if you let it. Where I am getting confused is what on the server side picks on the request? What on the server side sends back status codes 1, 2, 3, and 4? I understand your confusion. You're coming at this from a client-side processing model. Rails is server-side technology. You send it a request and it sends back the html / js that you need. As you get started with Rails it pays to let go and let Rails do it for you. If I understand your situation, you'll use periodically_call_remote to issue a request to your Rails app. Based on the state of something, you'll render a partial updating your page. RJS templates are what you're looking for. Cody Fauser's pdf document with the same title at O'Reilly is the best $10 bucks you'll ever spend on this. HTH, Bill -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: activerecord-postgresql-adapter
Bill Walton wrote: As a first step, try doing as instructed. gem install activerecord-postgresql-adapter If that doesn't work check back with more info. Best regards, Bill Yup...I did the same thing but the msg is the gem can't be found in any repository So, I am back at the same point... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Newbie question about views folder
Hi, I just started out learning Ruby on Rails this week. I'm using Michael Hartl's book, but I'm working on a remote server rather than my local computer. As such, I'm using Apache + Passenger to deploy the example programs rather than Mongrel. Also, I'm using MySQL for my database instead of SQLite. My issue is that I don't understand how to deploy a program on a remote server using Apache + Passenger in a way that makes the contents of the views directory accessible. For instance, if I create a sample program 'demo_app' and create a 'users' resource with the command: $ script/generate scaffold User name:string email:string and then migrate with the command: $ rake db:migrate I can't see the 'users' folder or anything in it when I point my browser to the remote server. I can see the standard 'Welcome aboard!' page at http://server_addr/demo_app, but http://server_addr/demo_app/users gives me a 404 Not Found. In my apache2.conf file, I have the following VirtualHost specification: VirtualHost *:80 ServerName server_addr DocumentRoot /projects/demo_app/public RailsBaseURI /demo_app /VirtualHost In my web root directory, 'demo_app' is a symbolic link to the application's public directory. I realize that there's nothing in my web root directory or the above VirtualHost specification that points to the 'users' resource, but when I build this app locally and view it with Mongrel, I can see http://0.0.0.0:3000/users just fine. All of the documentation I've read indicates that the above specification and symbolic link are all I need to create to deploy an app on a remote server with Apache + Passenger. Do I need to do something else to access http://server_addr/demo_app/users? Have I missed an obvious or elementary step? Am I misunderstanding something? Am I on another planet? Any help would be greatly appreciated. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: activerecord-postgresql-adapter
Had that problem before too. Sometimes it's a firewall issue. Sometimes means the code's been moved to github. Google the gem name and see what you come up with. HTH, Bill -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: [Newbie question] How does map.root?
On May 22, 12:32 am, Distriker ivanhcelrinconelme...@gmail.com wrote: ruby code class Index ActiveRecord::Base def Index end end /ruby code If I put this in my rails project, say me this the localhost: quote We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly. /quote Can someone explain me how does the map.root? I don't think this has anything to do with map.root - your controller should be called IndexController, it should be in index_controller.rb and it shouldn't be inheriting from ActiveRecord::Base. Also, method names should begin with a lowercase character. Fred -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Newbie question about views folder
Hi Frank, On Fri, May 21, 2010 at 8:45 PM, FrankMurphy sabir.a.ibra...@gmail.comwrote: I can see the standard 'Welcome aboard!' page at http://server_addr/demo_app, Just a swag here, but did you delete public/index.html on the remote server? Best regards, Bill -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Newbie question about views folder
On May 22, 2:45 am, FrankMurphy sabir.a.ibra...@gmail.com wrote: In my web root directory, 'demo_app' is a symbolic link to the application's public directory. I realize that there's nothing in my web root directory or the above VirtualHost specification that points to the 'users' resource, but when I build this app locally and view it with Mongrel, I can seehttp://0.0.0.0:3000/usersjust fine. All of the documentation I've read indicates that the above specification and symbolic link are all I need to create to deploy an app on a remote server with Apache + Passenger. Do I need to do something else to access http://server_addr/demo_app/users? Have I missed an obvious or elementary step? Am I misunderstanding something? Am I on another planet? Deploying an app to a sub uri (rather than to the root of your domain) is not the simplest case - you might want to try that first to reassure yourself that everything is basically working. What you've done doesn't seem to quite match the instructions at http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri Fred Any help would be greatly appreciated. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Newbie question about views folder
Hi Fred, On Fri, May 21, 2010 at 9:47 PM, Frederick Cheung frederick.che...@gmail.com wrote: On May 22, 2:45 am, FrankMurphy sabir.a.ibra...@gmail.com wrote: Deploying an app to a sub uri (rather than to the root of your domain) I missed that. Excellent catch, as always. Best regards, Bill -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: No default .htaccess
On May 21, 2:52 pm, Simon Che li...@ruby-forum.com wrote: NameVirtualHost 127.0.0.1:3000 Listen 127.0.0.1:3000 VirtualHost 127.0.0.1:3000 DocumentRoot /home/simon/projet-web/blog/public DirectoryIndex index.html LogLevel debug RailsEnv development Directory /home/simon/projet-web/blog/public AllowOverride All Options -MultiViews /Directory /VirtualHost Are you sure there's not some other stuff (eg some rewrite rules) that be being used - I don't see how just the above + your rails app would be doing redirects to a .php url Fred -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Newbie question about views folder
On Fri, May 21, 2010 at 06:45:11PM -0700, FrankMurphy wrote: For instance, if I create a sample program 'demo_app' and create a 'users' resource with the command: $ script/generate scaffold User name:string email:string and then migrate with the command: $ rake db:migrate I can see the standard 'Welcome aboard!' page at http://server_addr/demo_app, That's a good sign. but http://server_addr/demo_app/users gives me a 404 Not Found. Did you generate the new scaffold after your app was already running under Passenger? If so, and it's environment is set to production, did you modify the tmp/restart.txt file in your app to signal Passenger to restart the application? but when I build this app locally and view it with Mongrel, I can see http://0.0.0.0:3000/users just fine. That's probably also a good sign. I bet you just need to have Passenger reload the app as mentioned above. Details can be found at: http://www.modrails.com/documentation/Users%20guide.html#_redeploying_restarting_the_ruby_on_rails_application -- Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX What's the definition of a legacy system? One that works! Errare humanum est, ignoscere caninum. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: XMLHttpRequest and Rails
On May 22, 2:27 am, Ralph Shnelvar li...@ruby-forum.com wrote: Bill Walton wrote: Ok ... I need to do polling of the server. The polling will happen out of jQuery ... so there is no UI trigger event as such. Once I get my results back, I'll use jQuery to manipulate the DOM to pupulate certain fields ... as indicated by the XML returned. Where I am getting confused is what on the server side picks on the request? What on the server side sends back status codes 1, 2, 3, and 4? if by 1/2/3/4 you mean the XMLHttpRequest's readyState, nothing on the server manipulates that directly - the browser's implementation of XMLHttpRequest changes the readyState as the process of making the request advances. From the point of view of your rails app, this is just another request - you can render html/json/xml just as you would for any request. You may want to use respond_to or xhr? to adapt your response to the fact that it is an ajax request if your action is one that can be used by non ajax clients Fred -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Newbie question about views folder
Thanks everyone for your replies. Okay, so this is interesting. When I try deploying the app to the domain root, I can't see the Welcome aboard! page; instead, I see the index.html page that's in Apache's web root directory. Also, when I try http://server_addr/users, I see a directory listing of the (.erb) files that are in the demo_app/app/views/users. Does this mean that Passenger is not set up correctly? I don't know if it matters, but the server I'm using doesn't have a domain name; I'm accessing it using its IP address. On May 21, 7:47 pm, Frederick Cheung frederick.che...@gmail.com wrote: On May 22, 2:45 am, FrankMurphy sabir.a.ibra...@gmail.com wrote: In my web root directory, 'demo_app' is a symbolic link to the application's public directory. I realize that there's nothing in my web root directory or the above VirtualHost specification that points to the 'users' resource, but when I build this app locally and view it with Mongrel, I can seehttp://0.0.0.0:3000/usersjustfine. All of the documentation I've read indicates that the above specification and symbolic link are all I need to create to deploy an app on a remote server with Apache + Passenger. Do I need to do something else to access http://server_addr/demo_app/users? Have I missed an obvious or elementary step? Am I misunderstanding something? Am I on another planet? Deploying an app to a sub uri (rather than to the root of your domain) is not the simplest case - you might want to try that first to reassure yourself that everything is basically working. What you've done doesn't seem to quite match the instructions athttp://www.modrails.com/documentation/Users%20guide%20Apache.html#dep... Fred Any help would be greatly appreciated. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.