[Rails] Re: Form Authenticity Token Error generated from iframe

2010-04-06 Thread nisha
Actually iam well perplexed with the situation The form that iam embedding in another site, when submitted, the POST action does not actually store or retrieve anything from the database... It just manipulates the form param data, that is submitted by POST, to get the next page... So with this

Re: [Rails] Making a registration form that requires user to be over 13 (COPPA compliant form)

2010-04-06 Thread Gianluca Tessarolo
Assuming that date contains the borning date: if date < Date.today - 13.years # Ok else # No end Hi, In the U.S.A for anyone to have access to any site that allows you access to a chatroom, forum, anything that sends text over the internet you have to be over 13 unless everything everyone can

[Rails] Re: TypeError: Element.insert is not a function

2010-04-06 Thread Dawn
I recently overhauled pages for speed improvements including creating cached pages for my styles and javascript files and ended up with the same error. I performed diffs on my /public directories and found that my true.js file had concatenated file that was contained in another cached file. In ot

[Rails] Making a registration form that requires user to be over 13 (COPPA compliant form)

2010-04-06 Thread The_programmer
Hi, In the U.S.A for anyone to have access to any site that allows you access to a chatroom, forum, anything that sends text over the internet you have to be over 13 unless everything everyone can say is from a pre-select menu. Well, I don't want to limit people's freedom of speech but I do want t

[Rails] Re: Monitoring the changes in tag

2010-04-06 Thread Loganathan Ganesan
Colin Law wrote: > On 6 April 2010 13:36, Loganathan Ganesan wrote: >> >> We have observe_fields for the tags like using the "Onchange" >> event and >> can track the changes happening in the tag. >> >> Do we have the same kind of method for tag to get track the >> changes happening in the tag.

[Rails] Re: unknown attribute: version (nested forms)

2010-04-06 Thread oren
ActiveRecord::UnknownAttributeError in LocationsController#update unknown attribute: version RAILS_ROOT: /home/oren/misc/projects/borderstylo/content /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/ active_record/base.rb:2746:in `attributes=' /opt/ruby-1.8.7-p72/lib/ruby/gems

[Rails] Re: captcha in a belongs_to

2010-04-06 Thread Tom Mac
Hi Anybody please help. This still i can't solve Tom -- 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

Re: [Rails] Re: Will rake db:migrate:down VERSION=XXX completely remove that migration from Rails?

2010-04-06 Thread Ryan Waldron
It is in whatever database your app is using. Rails creates and maintains it for you. So if your production database is 'foo_prod', there would be a 'schema_migrations' table there, as well as in your 'foo_dev' development database. I don't know of a simple way to remove that row without firing

[Rails] Re: Will rake db:migrate:down VERSION=XXX completely remove that migration from Rails?

2010-04-06 Thread GoodGets
Thanks Ryan and, I hope this isn't too stupid of a question, but where is this 'schema_migrations' table? On Apr 6, 11:29 pm, Ryan Waldron wrote: > You'll also need to remove that migration's entry from the > 'schema_migrations' table.  That's how Rails keeps up with what > migrations exist, and

Re: [Rails] A Confirmation System?

2010-04-06 Thread Ryan Waldron
David, I don't know if this would help you, but you might poke around in http://github.com/subwindow/needs_approval for some ideas. I've not used it, so I don't know how mature it is. On Tue, Apr 6, 2010 at 5:08 PM, David Zhu wrote: > Hey, > > I'm not sure how complex this really is, but i hope

Re: [Rails] unknown attribute: version (nested forms)

2010-04-06 Thread Ryan Waldron
Where's the error message? On Tue, Apr 6, 2010 at 8:49 PM, oren wrote: > I try to update a nested model (version) and get this error.  any tips > would be great! > > my models: location has_many :versions > > # view > >  <% form_for location do |location_form| %> >     >      <%= location_form.la

Re: [Rails] Will rake db:migrate:down VERSION=XXX completely remove that migration from Rails?

2010-04-06 Thread Ryan Waldron
You'll also need to remove that migration's entry from the 'schema_migrations' table. That's how Rails keeps up with what migrations exist, and whether it's done them all. On Tue, Apr 6, 2010 at 10:10 PM, GoodGets wrote: > What exactly does rake db:migrate:down VERSION=XXX do?  I understand > th

Re: [Rails] Re: group objects by month

2010-04-06 Thread Ryan Waldron
If :birth_date is a Date, for instance, you could do it like this: @dogs.group_by{|dog| dog.birth_date.month} On Tue, Apr 6, 2010 at 9:36 PM, eggie5 wrote: > or group by week for that matter... > > On Apr 7, 11:35 am, eggie5 wrote: >> I have a collection of of objects from an query. I can group

[Rails] Will rake db:migrate:down VERSION=XXX completely remove that migration from Rails?

2010-04-06 Thread GoodGets
What exactly does rake db:migrate:down VERSION=XXX do? I understand that it runs the "down" migration, completely removing any columns/ tables that migration may have created, but does this mean that I can can delete these migration files as well? I'd like for Rails to have no knowledge of their

[Rails] Re: group objects by month

2010-04-06 Thread eggie5
or group by week for that matter... On Apr 7, 11:35 am, eggie5 wrote: > I have a collection of of objects from an query. I can group them by > using: > > @dogs.group_by(&:birth_date) > > that works fine... and it groups them by date, however, I want to > group them by month. How can I do this? -

[Rails] group objects by month

2010-04-06 Thread eggie5
I have a collection of of objects from an query. I can group them by using: @dogs.group_by(&:birth_date) that works fine... and it groups them by date, however, I want to group them by month. How can I do this? -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: A Confirmation System?

2010-04-06 Thread Ar Chron
David Zhu wrote: > just I don't know the syntax. where do you guys go to learn? The PickAxe book (Programming Ruby) and Agile Web Development with Rails (slightly less useful nowadays for me) rarely leave arms-reach from my desk (along with Deploying Rails Applications <- you want to read this,

[Rails] unknown attribute: version (nested forms)

2010-04-06 Thread oren
I try to update a nested model (version) and get this error. any tips would be great! my models: location has_many :versions # view <% form_for location do |location_form| %> <%= location_form.label location.section %> <%= location_form.label location.sub_section %> <%=

[Rails] Re: Authenticating against ActiveDirectory - can't read userPassword/unicodePwd?

2010-04-06 Thread Matt Jones
On Apr 5, 8:27 pm, Marcelo de Moraes Serpa wrote: > Hello list, > > So, the application I am working on right now needs to have LDAP > authentication build in, meaning that if the user enabled it, we will query > about his basic data (email,pwd) on a user-setup LDAP directory. It used to > work

[Rails] Re: Blank Log Files - New to RoR - Ubuntu Server 9.10

2010-04-06 Thread Justin
Success!! (Sorry for the delay - I've been under the weather and busy with some other things) It's working in development, but not production mode. (Can you help with that?) The changes I made: 1. Change ownership on everything to www-data:www-data 2. chmod -R 775 /home 3. Added RailsEnv developm

[Rails] Re: A Confirmation System?

2010-04-06 Thread David Zhu
Ok great idea, thanks a lot, what type of field should that approved field be? There are boolean type fields aren't they? Can i use those? Where are you guys learning ruby on rails? In my head, coming from other prorgamming backgrounds, i can chart out everything i need to do, just I don't know th

Re: [Rails] Re: http://api.rubyonrails.org/ not working!!

2010-04-06 Thread Xavier Noria
Works from Spain. rorguy, the site is apparently fine, you are surely experiencing a local issue. -- 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

[Rails] Re: A Confirmation System?

2010-04-06 Thread E. Litwin
It seems like you are over complicating this. Why not just add an "Approved" field (or something similar) to the model? You can then allow admins to set the Approved field to true. You can setup security around this field so that only admins can edit it. Within your application, you can then filte

[Rails] EXIFIR problem

2010-04-06 Thread John Krueger
class Photo < ActiveRecord::Base belongs_to :album after_create :set_exif_data has_attached_file :image, :styles => { :display => "300x200" } def set_exif_data logger.debug "setting exif" exif = EXIFR::JPEG.new( self.photo.path ) logger.debug"setting exif2"

[Rails] Re: A Confirmation System?

2010-04-06 Thread David Zhu
Hmm great explanation. I'm not that great at ror, so could u briefly show me some sample Create/form code that stores the fields, and transfers them to an admin? Do i need to create a whole new database for pending requests? Thanks On Apr 6, 6:24 pm, Frederick Cheung wrote: > On Apr 6, 11:08 pm

[Rails] Re: A Confirmation System?

2010-04-06 Thread Frederick Cheung
On Apr 6, 11:08 pm, David Zhu wrote: > Hey, > > I'm not sure how complex this really is, but i hope it isn't too > difficult for you guys to explain here > > My question is, is there a way to intercept a Submit action (for a > scaffold, etc) of a form, and take that submit action and present it

[Rails] A Confirmation System?

2010-04-06 Thread David Zhu
Hey, I'm not sure how complex this really is, but i hope it isn't too difficult for you guys to explain here My question is, is there a way to intercept a Submit action (for a scaffold, etc) of a form, and take that submit action and present it to an ADMIN user, where he/she can either finish sub

Re: [Rails] Re: http://api.rubyonrails.org/ not working!!

2010-04-06 Thread David Moreno
Works in the East Coast as well. On Tue, Apr 6, 2010 at 4:17 PM, Greg Donald wrote: > On Tue, Apr 6, 2010 at 2:11 PM, rorguy wrote: > > The site is not working at all for me. > > Works for me. > > > -- > Greg Donald > destiney.com | gregdonald.com > > -- > You received this message because you

[Rails] Re: please help; form_for passes nil

2010-04-06 Thread Frederick Cheung
On Apr 6, 8:30 pm, dirtbug wrote: > Colin, > > The log now shows: > > Processing OrvesController#update (for 128.119.60.171 at 2010-04-06 > 14:48:28) [PUT] Have you had a look (with tcpdump, Firebug etc. ) at exactly what your form sends to the server? Fred -- You received this message beca

[Rails] Re: error with 'will_paginate' -- need help!

2010-04-06 Thread Frederick Cheung
On Apr 6, 9:41 pm, ironmantis7x wrote: > Can someone help me out?  I checked to see if I have will_paginate > installed and if it is loaded and it is installed correctly and it > responds. > > What am I doing wrong? Is your model really called Page? Fred > > Thanks!! > > ironmantis7x -- You

[Rails] error with 'will_paginate' -- need help!

2010-04-06 Thread ironmantis7x
My controller is as follows: class CommunityController < ApplicationController helper :profile def index @title = "Community" @letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("") if params[:id] @initial = params[:id] @pages = Page.paginate :page => params[:page], :order

[Rails] Re: please help; form_for passes nil

2010-04-06 Thread dirtbug
Colin, I don't have a new method or view, as the db gets populated by a script that directly accesses the MySQL db. Thus the db records aren't created by Rails at all, which might be the source of the problem I don't know. The thing is, it all worked fine before we upgraded to Rails 2. I'll try

[Rails] Re: files in lib directory not loading

2010-04-06 Thread Daniel Tsadok
There is a typo on the blog post you referred to. It should go in lib/ not app/lib. Also from the same post: "Rails autoloads (and namespaces) any code placed in the lib directory, so that is where we’ll place our FirebugLogger code." --Daniel rails.n...@gmail.com wrote: > Does anyone have a

Re: [Rails] Re: http://api.rubyonrails.org/ not working!!

2010-04-06 Thread Greg Donald
On Tue, Apr 6, 2010 at 2:11 PM, rorguy wrote: > The site is not working at all for me. Works for me. -- Greg Donald destiney.com | gregdonald.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 ru

Re: [Rails] Re: please help; form_for passes nil

2010-04-06 Thread Colin Law
On 6 April 2010 20:30, dirtbug wrote: > Colin, > > The log now shows: > > Processing OrvesController#update (for 128.119.60.171 at 2010-04-06 > 14:48:28) [PUT] >  Parameters: {"orf"=>nil, "commit"=>"Update", "id"=>"1705"} Well, amazing, after fixing multiple problems the fundamental issue remains

[Rails] Prototype/script-atulo-us guidance needed, I think.

2010-04-06 Thread RichardOnRails
Hi, I’ve got an app\views\expenses\new.html.erb file displayed at http://www.pastie.org/906145. Q1: Lines 22-26, repeated here create a drop-down list of “vendor names” in true Ajax fashion: they push all lower-positioned items south to make room for the vendor names being created. I’d rather cove

[Rails] Re: show all children of object

2010-04-06 Thread Robert Walker
AMILIN Aurélien wrote: > So try with this instead : > > def showObjectBs > @ObjectA = ObjectA.find(params[:id]) > @ObjectBs = ObjectB.find(:all, :conditions => ['objectA_id ?', > @ObjectA.id]) > > respond_to do |format| > format.html # show.html.erb > format.xml { render

[Rails] Re: please help; form_for passes nil

2010-04-06 Thread dirtbug
Colin, The log now shows: Processing OrvesController#update (for 128.119.60.171 at 2010-04-06 14:48:28) [PUT] Parameters: {"orf"=>nil, "commit"=>"Update", "id"=>"1705"} [4;36;1mOrf Columns (22.6ms) [0m[0;1mSHOW FIELDS FROM `orves` [0m [4;35;1mOrf Load (0.9ms) [0m[0mSELECT * FROM `

Re: [Rails] Re: http://api.rubyonrails.org/ not working!!

2010-04-06 Thread Hassan Schroeder
On Tue, Apr 6, 2010 at 12:11 PM, rorguy wrote: > The site is not working at all for me. This is really annoying. Is > there no one who can fix this? Fix what? FWIW, the Rails api site is both accessible and serving appropriate content from here (US West Coast). -- Hassan Schroeder ---

[Rails] Re: http://api.rubyonrails.org/ not working!!

2010-04-06 Thread rorguy
The rake doc:rails fails. The site is not working at all for me. This is really annoying. Is there no one who can fix this? Where are the people managing the ROR site? On Apr 2, 1:58 pm, Xavier Noria wrote: > On Fri, Apr 2, 2010 at 8:57 PM,rorguy wrote: > > Not sure if anyone else has loo

Re: [Rails] Re: please help; form_for passes nil

2010-04-06 Thread Colin Law
On 6 April 2010 19:26, dirtbug wrote: > Colin, > > I added a layout file that had gone missing and now it validates.  The > html; Well, that was a worthwhile exercise, even if it was not the cause of the problem. > >       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > > http://w

[Rails] Re: 'to_f or not to_f', that is the matter of my question...

2010-04-06 Thread Grary
Having duly considered it, I withdraw my suggestion of a 'tradeoff'. I'm better off for your comments, so thanks all. Grar On Apr 5, 3:38 pm, Colin Law wrote: > On 5 April 2010 19:48, Grary wrote: > > > Colin, > > > So, there is something I will regret either in terms of i) db > > performance

[Rails] Re: please help; form_for passes nil

2010-04-06 Thread dirtbug
Colin, I added a layout file that had gone missing and now it validates. The html; http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> Orves: edit Editing orf Gura_0317 And the validation report

Re: [Rails] SystemTimer failing

2010-04-06 Thread Marcelo de Moraes Serpa
No, I can't tell you. First, because it has nothing to do with the topic of this message, seconds, because it is obvious it is GoogleGroups, and it is simple enough to cancel the subscription, and third, because a simple google search is enough to get very clear instructions. Gee, this list needs

[Rails] Re: how does Rails / Apache handle database connections?

2010-04-06 Thread Frederick Cheung
On Apr 6, 5:19 pm, Daniel Higginbotham wrote: > Hi all, > > I'm trying to figure out how Rails handles database connections. The > business problem is: > * My users have access to multiple, structurally identical schemas > * So, for each request, Rails needs to be able to talk to a different > s

[Rails] Re: Switching from SQLite 3 to MySQL DB gives strange redirects

2010-04-06 Thread Blaise
I wanted to test it out to see how it performed, generally it was pretty good. however it failed at performing multiple transactions, naturally this isn't great for a web app. On Apr 5, 5:32 pm, Colin Law wrote: > On 5 April 2010 10:36, Blaise wrote: > > > Hi there, > > > I have a site that's be

[Rails] Re: please help; form_for passes nil

2010-04-06 Thread dirtbug
Colin, Here is the html of the form, before I press the update button: Editing orf Gura_0317 When I paste it into the html validator (on their web page), I get: Validation Output: 2 Errors 1. Error Line 1, Column 1: no document type declaration; will parse without validat

Re: [Rails] show all children of object

2010-04-06 Thread AMILIN Aurélien
It seems you have 3 problems with your snippets : First you need to find objectA in your database to use it Then the conditions in the find method doesn't seem correct Finally you've forgottent an 's' at the end of @objectB (And the naming convention you're using is not correct but that's not the p

[Rails] how does Rails / Apache handle database connections?

2010-04-06 Thread Daniel Higginbotham
Hi all, I'm trying to figure out how Rails handles database connections. The business problem is: * My users have access to multiple, structurally identical schemas * So, for each request, Rails needs to be able to talk to a different schema * It's essential that users not pull data from the wrong

[Rails] Re: show all children of object

2010-04-06 Thread Ar Chron
ES wrote: > I have an index page of 'objects A' who each have many of another > 'object B'. > > I want to have a link that will open a popup and list all the object > B's of an object A. > class A has_many :bs end class B belongs_to :a end (AsController) def b_popup @a = A.find(params[:i

[Rails] want to get one-by-one error message

2010-04-06 Thread Rutvij Pandya
Dear all, In RoR, on one form if I 've applied validations to 7 fields & while running an application if user insert invalid values in i.e. 3 fields at that time RoR shows error message for all 3 fields. I want error messages to be shown one-by-one Like if user correct first field then only

[Rails] show all children of object

2010-04-06 Thread ES
I have an index page of 'objects A' who each have many of another 'object B'. I want to have a link that will open a popup and list all the object B's of an object A. I have this: <%= link_to( "details of object B", { :controller=>"objectA", :action=>"showObjectBs", :ObjectA => ObjectA}, { :popu

Re: [Rails] Re: please help; form_for passes nil

2010-04-06 Thread Colin Law
On 6 April 2010 17:12, Colin Law wrote: > On 6 April 2010 16:51, dirtbug wrote: >> Colin, >> >> I don't know how to determine if validation is happening or whether it >> is successful. > > I have told you twice previously.  Install the html tidy plugin in > firefox, and/or paste the whole html of

Re: [Rails] Re: please help; form_for passes nil

2010-04-06 Thread Colin Law
On 6 April 2010 16:51, dirtbug wrote: > Colin, > > I don't know how to determine if validation is happening or whether it > is successful. I have told you twice previously. Install the html tidy plugin in firefox, and/or paste the whole html of the page (View, Page Source in browser, or similar

[Rails] Re: please help; form_for passes nil

2010-04-06 Thread dirtbug
Colin, I don't know how to determine if validation is happening or whether it is successful. The edit.html.erb is: Editing orf <% form_for @orf do |f| %> <%= f.error_messages %> <%= h @orf.locus_tag %> <%= f.text_field 'current_annotation', :size => 50 %> <%= f.submit "Update" %>

[Rails] Re: ruby script - how to write one that deals with different environment?

2010-04-06 Thread bseanvt
If you set up a rake task in lib/tasks/your_cron_job.rake with something like this namespace :your_cron_job do desc "describe the task" task :every_five_minutes => :environment do @post = Post.new end end you can add it manually to the cron by typing 'crontab -e' which opens the f

[Rails] Re: How do I initialise

2010-04-06 Thread Frederick Cheung
On Apr 6, 4:12 pm, John Lane wrote: > Hi, I'm playing around with module instance variables. I can set one up > and initialise it when the module is included in a class. What I can't > work out is how I initialise one when a class inherits another class > that includes the module. > > Seehttp://

[Rails] Re: Issue with libxml validation block

2010-04-06 Thread Clément LAGRANGE
A quick note to add that I don't think it's a libxml issue ! If you have any insight of the require process of Rails, more specifically differences between WebBrick and Console in requiring gems, I'd be glad to hear about it... Regards, 2010/4/2 Clément LAGRANGE : > Hello, > I have a weird issue w

[Rails] How do I initialise

2010-04-06 Thread John Lane
Hi, I'm playing around with module instance variables. I can set one up and initialise it when the module is included in a class. What I can't work out is how I initialise one when a class inherits another class that includes the module. See http://pastie.org/905720 This creates two classes, the

Re: [Rails] Re: please help; form_for passes nil

2010-04-06 Thread Colin Law
On 6 April 2010 15:25, dirtbug wrote: > Fred > > Thanks. I took out the whole button_to line, but it still doesn't > work.  I now have: > Editing orf > <% form_for @orf do |f| %> >  <%= f.error_messages %> >  <%= h @orf.locus_tag %> >  <%= f.text_field 'current_annotation', :size => 50  %> >      

[Rails] Re: mysql syntax error when trying to capture cumulative sum

2010-04-06 Thread John Merlino
Frederick Cheung wrote: > On Apr 6, 12:19�am, John Merlino wrote: >> Hey all, >> >> I've searched the web and cannot find an example of getting a cumulative >> count by month for a specific object using Rails, and then displaying >> that in an array. This gives a mysql syntax error: >> > > count

[Rails] Re: please help; form_for passes nil

2010-04-06 Thread dirtbug
Fred Thanks. I took out the whole button_to line, but it still doesn't work. I now have: Editing orf <% form_for @orf do |f| %> <%= f.error_messages %> <%= h @orf.locus_tag %> <%= f.text_field 'current_annotation', :size => 50 %> <%= f.submit "Update" %> <% end %> Still doesn't up

Re: [Rails] Monitoring the changes in tag

2010-04-06 Thread Colin Law
On 6 April 2010 13:36, Loganathan Ganesan wrote: > Dear friend, > >  I need a suggestion for the following requirement: > > I have a tag as follows: >   >   > >  I used the link_to_remote and using that updated the response in the > . > > We have observe_fields for the tags like using the "Onc

[Rails] Monitoring the changes in tag

2010-04-06 Thread Loganathan Ganesan
Dear friend, I need a suggestion for the following requirement: I have a tag as follows: I used the link_to_remote and using that updated the response in the . We have observe_fields for the tags like using the "Onchange" event and can track the changes happening in the tag. Do w

Re: [Rails] Importing gems to another machine

2010-04-06 Thread Andy Jeffries
If you've used config.gem in your environment.rb file, it's as simple as: rake gem:install If you haven't I'd recommend going that route anyway rather than trying to copy files over, libraries for native gems (e.g. MySQL) may not be in the same place or the same version. It's much safer to have

Re: [Rails] Re: Switching between Rails 3 and Rails 2

2010-04-06 Thread Rick DeNatale
On Sun, Apr 4, 2010 at 8:30 AM, Smart RoR wrote: > The downgrade or may be just switching between both. > > rails _2.3.5_ > > and > > rails _3.0.0_ > > styles may not work if both 2.3.5 and 3.0.0 is there? > > Just want to be able to switch easily on Mac. If you are talking about switching betwee

[Rails] Importing gems to another machine

2010-04-06 Thread Tushar Gandhi
Hi, I am working on an application which has around 70 gems installed. My problem is my coulig also wants to up the application. Is there any way to just import my gems to his machine? and application gets up and running, Otherwise he has to install all gems. Can anyone help me out? Thanks, Tusha

[Rails] captcha in a belongs_to

2010-04-06 Thread Tom Mac
Hi I am using simple_captcha. I have two models User and Staff. Relation ship are User has_one staff staff belongs_to user Now in the staff edit I have to include a captcha. I did like <% form_for @user, :url => staff_url(@staff), :html => {:method => :put } do |f|%> <%= f.te

[Rails] Re: how to create a form for multiple entries?

2010-04-06 Thread Nicolas Iensen
It seems that you created the guest and invite routes nested, right? So, you have to write your form like this: <% form_for([...@invite, guest]) do |f| %> This form above will use the url: /invites/:invite_id/guests/:id/edit Some reference: http://adamblog.heroku.com/past/2007/12/20/nested_res

Re: [Rails] ruby script - how to write one that deals with different environment?

2010-04-06 Thread Gordon Yeong
guys, in addition to Peter's reply, here's a good reference for script/runner. On 6 April 2010 19:55, Peter Hickman wrote: > If you use script/runner then just use them as you normal would. > > Scripts run from script/runner run as normal rails application so all the > same setup that the web a

[Rails] Re: ruby script - how to write one that deals with different environment?

2010-04-06 Thread Luke Pearce
> If you use script/runner then just use them as you normal would. Just out of curiosity couldn't you just to a rake task instead and call that from cron? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta

[Rails] acts as ferret no search results

2010-04-06 Thread Babos Cata
Hi, I`m having trouble with acts_as_feret gem. It renders no results. First I < require 'acts_as_ferret' > in enviroment.rb. Then I use < acts_as_ferret > in every model I need. (user, spec, detalii) I made a serch form partial. <% form_tag({ :action => "Search" }, :method => "get") do %> Se

Re: [Rails] ruby script - how to write one that deals with different environment?

2010-04-06 Thread Gordon Yeong
hi, Andy and Peter, Thanks for the feedback :) i will try it out :) Regards, Gordon Yeong On 6 April 2010 19:55, Peter Hickman wrote: > If you use script/runner then just use them as you normal would. > > Scripts run from script/runner run as normal rails application so all the > same setup t

[Rails] Re: incompatible character encodings: ASCII-8BIT and UTF-8

2010-04-06 Thread Heinz Strunk
Oh what I forgot. The icompati... error is showing on a line where I'm using I18n.t and it would return a string with a umlaut. -- 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 gr

Re: [Rails] ruby script - how to write one that deals with different environment?

2010-04-06 Thread Peter Hickman
If you use script/runner then just use them as you normal would. Scripts run from script/runner run as normal rails application so all the same setup that the web application has will be provided for your script. -- You received this message because you are subscribed to the Google Groups "Ruby

Re: [Rails] ruby script - how to write one that deals with different environment?

2010-04-06 Thread Andy Jeffries
On 6 April 2010 10:40, Gordon Yeong wrote: > Cool but how abt accessing the models? Andy gave a solution but i want > to see what others think > You should just be able to access the models normally (i.e. just use the class, without needing to require anything) if you're using script/runner. If

[Rails] Re: incompatible character encodings: ASCII-8BIT and UTF-8

2010-04-06 Thread Heinz Strunk
Manos wrote: > Are you sure you don't have hard coded strings in the partial or > strings assigned > to variables through controller? I'm only using I18n.t for strings and globalize2 for model translation. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are su

[Rails] Re: incompatible character encodings: ASCII-8BIT and UTF-8

2010-04-06 Thread Heinz Strunk
Andre Lewis wrote: > > Most likely, you are outputting content stored in your DB as UTF-8 onto > a template that is ASCII. This fix works for me: > http://gist.github.com/273741 -- drop this into > config/initializers/ruby_191_hacks.rb. I posted more about upgrading to > 1.9.1 here: > http://

Re: [Rails] ruby script - how to write one that deals with different environment?

2010-04-06 Thread Gordon Yeong
Cool but how abt accessing the models? Andy gave a solution but i want to see what others think On 4/6/10, Peter Hickman wrote: > All you need is access to the RAILS_ENV constant. For example this script > > -- x.rb-- > puts RAILS_ENV > > > When run produces the following output: > > $ ruby

Re: [Rails] ruby script - how to write one that deals with different environment?

2010-04-06 Thread Peter Hickman
All you need is access to the RAILS_ENV constant. For example this script -- x.rb-- puts RAILS_ENV When run produces the following output: $ ruby script/runner -e production x.rb production $ ruby script/runner -e development x.rb development $ ruby script/runner -e test x.rb test for any

[Rails] Re: paperclip question

2010-04-06 Thread bramu...@gmail.com
Thanks all for your suggestions... Hansraj, can you please post the code snippet which does that... On Apr 5, 12:52 pm, hansraj wrote: > You can do it by just writing a rake task which takes in the already > uploaded images one by one > and then reprocess them and upload them again. > This will t

Re: [Rails] ruby script - how to write one that deals with different environment?

2010-04-06 Thread Andy Jeffries
The easiest way may be to have a class with a class method, e.g. class FooRunner def self.run ... end end And then call: /path/to/my/app/script/runner -e production FooRunner.run from Cron. Cheers, Andy -- Andy Jeffries http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery Re

Re: [Rails] SystemTimer failing

2010-04-06 Thread Todd Reeves
Hello.. Can anyone tell me how to get off this mailing list? From: Marcelo de Moraes Serpa To: rubyonrails-talk@googlegroups.com Sent: Mon, April 5, 2010 5:06:50 PM Subject: [Rails] SystemTimer failing Hello list, I have searched everywhere else, tesed extens

[Rails] [JOBS] Web Programmer at Reed College, Portland OR

2010-04-06 Thread mcolgr...@reed.edu
Reed College is looking for a web programmer who's interested in working in an enterprise setting but doesn't want to be told not to bring your dog to the office. In the Web Support Services group, we work on web apps that are part of our homegrown campus portal and courseware systems. Most of ou

[Rails] Re: how to upload video file??

2010-04-06 Thread The_programmer
On Apr 5, 10:51 pm, shyam mohan wrote: > Try > thishttp://jimneath.org/2008/06/03/converting-videos-with-rails-convertin... > -Shyam > > On Tue, Apr 6, 2010 at 3:46 AM, Rutvij Pandya wrote: > > Dear all, > > > kindly help me to upload video files... > > > Thanking you. > > -- > > Posted vi

Re: [Rails] Using RadRails

2010-04-06 Thread Gianluca Tessarolo
You must have the two versions installed: gem list rack *** LOCAL GEMS *** rack (1.1.0, 1.0.1) So if you have installed the 1.1.0 version and have uninstalled the 1.0.1 version simply reinstall the previous version: gem install rack -v 1.0.1 Hope this helps Hi, I'm new to RoR and have do

[Rails] Re: Using RadRails

2010-04-06 Thread Luke Pearce
> > C:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:271:in > `require_frameworks': RubyGem version error: rack(1.0.0 not ~> 1.0.1) > (RuntimeError) > ... > I've tried $ gem install rack to update the version (to 1.1.0): I would try installing the version of rack it's asking for ins

[Rails] ruby script - how to write one that deals with different environment?

2010-04-06 Thread ct9a
hi guys, I would like to write a script that is runned by cron. It will update multiple entries. Any guides for this? I can't figure out how do we choose which ruby environment (ie. development/test/production) in the script and also, how do I access models in the script (which is also used by

Re: [Rails] how to create a form for multiple entries?

2010-04-06 Thread Christophe Decaux
I'm not a professional Rails developper but I believe I went through the same kind of issue. So take a look at this: http://railscasts.com/episodes/75-complex-forms-part-1 and possibly part-2 and 3 as well. Christophe Le 6 avr. 2010 à 08:01, ct9a a écrit : > hi guys, > > I have a fairly simp