[Rails] sessions

2010-05-03 Thread Rajkumar Surabhi
hi all, in my application i have to maintain the user information in session and updates the table flag when the user logins and while loggingout i change the flag to zero. i want to delete the stale sessions and while doing this i want to perform operation on tables how to do this. Please let

[Rails] Re: Finding the next item, in a group of items.

2010-05-03 Thread Joe
Ok, so I've created my position thing for every tutorial. However now I need to know how I can setup render :partial to order the tutorials using the position, and then if two (or more) tutorials have the same position, then go back and check there id, and order the ones with the same position by

[Rails] Scriptaculous Problems

2010-05-03 Thread ahmompoint
Hello community, I am a fairly new RoR programmer and I need some help with Scriptaculous Drag and Drop: So I have %= draggable_element(@div_id, :revert = failure, :snap = 5) -% and a droppable: %= drop_receiving_element(@team_div_id, :with = 'player=' + (element.id)+ 'position=' +

[Rails] Need Help on Virtual Timer Expired issue

2010-05-03 Thread v4 forums
Hi Everyone, I am new to RoR and in the past couple of years, I was mostly involved in Java/J2EE programming. I've just started learning ruby and rails from the last few days. Programming in Ruby on Rails is fun, the one thing I like the most is not worrying about the boiler plate code

[Rails] Need Some Help in Configuring Webrick Server

2010-05-03 Thread Sajith Vimukthi
Hi, I am very new to ruby and I have encountered some problem in starting up the webrick server. I used the command ruby script/server webrick -e production and I encounter with the following error. C:\Redmine\redmine-0.9.4ruby script/server webrick -e production = Booting WEBrick = Rails 2.3.5

[Rails] Re: struggling with accepts_nested_attributes_for

2010-05-03 Thread kc00l
Hello, I think the issue could be in the 'Response' attribute in : accepts_nested_attributes_for :response_items, :allow_destroy = true, :reject_if = proc { |attributes| attributes['Response'].blank? } The way you wrote this method means that creations (or updates) of ResponseItem instances

[Rails] Re: Finding the next item, in a group of items.

2010-05-03 Thread Frederick Cheung
On May 3, 8:12 am, Joe j...@dev-hq.co.uk wrote: Ok, so I've created my position thing for every tutorial. However now I need to know how I can setup render :partial to order the tutorials using the position, and then if two (or more) tutorials have the same position, then go back and check

[Rails] Re: Need Some Help in Configuring Webrick Server

2010-05-03 Thread Frederick Cheung
On May 3, 5:35 am, Sajith Vimukthi sajith@gmail.com wrote: Could not find RubyGem hoe (= 1.3.0) (Gem::LoadError) Anyway I tried with several options such as without the -e part and etc. What is this missing RubyGem hoe thing? How can I get through this? Thanks in advance. rubygems is

[Rails] Re: Finding the next item, in a group of items.

2010-05-03 Thread Joe
So I change it to this: %= render :partial = @category.tutorials.ordered_by_position % and I get the error: undefined method `ordered_by_position' I'm guessing that's because I have to create a method that orders them by position. However I'm a noob in ruby on rails, where do I create the method,

Re: [Rails] Re: Need Some Help in Configuring Webrick Server

2010-05-03 Thread Sajith Vimukthi
Thanks a lot Fredrick. It works. On Mon, May 3, 2010 at 3:06 PM, Frederick Cheung frederick.che...@gmail.com wrote: On May 3, 5:35 am, Sajith Vimukthi sajith@gmail.com wrote: Could not find RubyGem hoe (= 1.3.0) (Gem::LoadError) Anyway I tried with several options such as without

[Rails] local Ruby on rails events in Gurgaon,Delhi India...?

2010-05-03 Thread shyam mohan
Hi All! Is there any Local Group ... or events on ruby on rails ...Meets etc I want to join that . Please tell me abt that... -Shyam -- 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

[Rails] Re: Having trouble with Validatable

2010-05-03 Thread Priyanka Pathak
Hi, You just add include Validatable in your model after installing validatable gem. level option will work with active record validation. For more information refer this url - http://validatable.rubyforge.org/ -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] Re: rails ROUTING map.root

2010-05-03 Thread Priyanka Pathak
Hi, During processing of request first it executes routes. so, it's not possible to add above type of conditional statement (authentication). For conditional routing refer - http://www.buildingwebapps.com/articles/7082-enhancing-conditional-routing-in-rails -- Posted via

[Rails] Re: struggling with accepts_nested_attributes_for

2010-05-03 Thread Kevin Tambascio
Actually, Response is the name of the column in the database. Unfortunately, the schema I was asked to use was not as RoR as I would have preferred. But you think even if that is the real column name, it could be tripping up Rails? I'll try your suggestion out tonight.. Thanks, Kevin --

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-05-03 Thread tonypm
Normal? What makes them any more or less normal? i just knew someone would pick up on that comment!! I added in Windows to clarify, but re reading what I wrote, I should have said cut and paste buffer keystrokes, which is what I think was predominantly in my mind. The reason I stuck with

[Rails] rake TEST=test/unit/whatever_test.rb is executed 3 times.

2010-05-03 Thread Damaris Fuentes
Hi you all, I execute rake TEST= test/unit/whatever_test.rb, and it is executed 3 times. That it, the output is something like: c:/ruby .. test/unit/whatever_test.rb Loaded suite . Started F Finished in 0.8 ... 1 tests, 1 assertions, 1 failures, 0 errors c:/ruby

[Rails] Re: rake TEST=test/unit/whatever_test.rb is executed 3 times.

2010-05-03 Thread Frederick Cheung
On May 3, 1:15 pm, Damaris Fuentes li...@ruby-forum.com wrote: Hi you all, Is this a normal behaviour? The test is the default one when you create a model and I'm using Ruby 1.8.6. and Rails 2.1.2. rake version is 0.8.6 If you want to run just one test I'd do ruby -Itest test/unit/

[Rails] Re: How do you use rails with (triggers and Oracle)?

2010-05-03 Thread Denzel De rocker
Chris Richards wrote: I have an existing database in Oracle. All the tables have triggers that insert the next value from the table sequence into the id column. I have told rails about the sequence using set_sequence_name. The problem occurs when rails trys to insert a new row. It grabs

[Rails] how to access serialized attributes in my views?

2010-05-03 Thread Lille
Hi, I have a serialized attribute in a model: serialize :some_array, Array (I've unit tested this attribute and it works just like an Array should.) Now, how do I supply my some_array attribute to my views so that I can reference elements of my array? The following, for example, won't

[Rails] How to set default cookie domain in Rails3

2010-05-03 Thread Jabulani
I want to set default cookie domain for my application to .mydomain.com to allow cookie session be preserved across subdomains. I use = config.action_dispatch.session = {:domain = .mydomain.com} in application.rb, but thats not working. The cookie is saved as 'mydomain.com' Thanks for the help!

[Rails] Displaying Errors with Code 500 as 200 in Rails3

2010-05-03 Thread kb
Hi! We make Facebook-Apps with Rails3. Facebook do not display Errormessages with a Errorcode 500. So we have to display what comes as error with Code 200. I am looking forward to modify an existing Gem called buddy which makes the Facebook-Stuff. But I don't know how to do this in Rails3. I

[Rails] Re: Updating an Application

2010-05-03 Thread doug
Why do you need this system rather than just pulling down the latest version from source control ? Because there are some files that may have been modified with customer- specific code. We never want to overwrite these files. However, if a file in this group doesn't exist on the system being

[Rails] Re: Updating an Application

2010-05-03 Thread doug
But if you *must* do something like the above, it's called `rsync` and it handles case #3 as well. I'm going to look into this. Thanks for the suggestion. ... doug -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] How to judge whether SSL has been applied?

2010-05-03 Thread Wason Wang
How to judge whether or not the SSL has been applied on the server IIS with ruby on rails? -- 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

[Rails] Re: Need Help on Virtual Timer Expired issue

2010-05-03 Thread v4 forums
Just a small update, I got this issue fixed by downgrading the version of 'mysql' gem that I installed from 2.8.1 to 2.7 and the rake db:migrate stopped throwing the 'Virtual Time Expired' error. Thanks On Mon, May 3, 2010 at 8:17 AM, v4 forums v4for...@gmail.com wrote: Hi Everyone, I am new

Re: [Rails] Re: Updating an Application

2010-05-03 Thread Michael Pavling
On 3 May 2010 17:02, doug ddjol...@gmail.com wrote: Why do you need this system rather than just pulling down the latest version from source control ? Because there are some files that may have been modified with customer- specific code.  We never want to overwrite these files.  However, if a

Re: [Rails] Re: dev tool

2010-05-03 Thread v4 forums
+1 for Vim and rails.vim plugin. On Mon, May 3, 2010 at 2:40 AM, nirosh kunalan.kand...@gmail.com wrote: Aptana RadRail,Netbeans i'm using these 2 for my dev. pretty cool for me try it. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] rendering images dynamically

2010-05-03 Thread candor
Hi, I have a rails application where I respond to a request by fetching image urls from various web api calls and need to display them as they come available. I am able to display all the images once I get them all, but that causes an unacceptable delay for my user. One approach I am trying is,

[Rails] Netbeans error?

2010-05-03 Thread slindsey3000
History... before it went to heck... I have been working a project in Netbeans for a month. I did a gem update outside of Netbeans while I was installing ImageMagick and RMagick... I also had to remove one verson of ImageMagick to use the one compatible with RMagick. Everything was working

[Rails] logger with backgrounDrb

2010-05-03 Thread Jonhy Pear
Hello, I have a backgrounDrb worker calling a ActiveRecord object, ex: worker: def process_campaign Campaign.process end campaign.rb: Campaign ActiveRecord::Base .. .. def self.process logger.info(Start processing...) end If I test in dev env, the line logger.info(Start

[Rails] Re: Updating an Application

2010-05-03 Thread Frederick Cheung
On May 3, 5:14 pm, Michael Pavling pavl...@gmail.com wrote: I'd suggest a review of your internal processes with all the developers, PMs and other stakeholders to discuss how to manage code deployment. As a suggestion, I'd recommend a branch of your code for each of your deployed client sites.

[Rails] mysql adapter 2 statments

2010-05-03 Thread Laurent Buffat
Hi, I have an error with mysql adapter when where is two statment in the same sql execution. I don't have this error with postgres adapter. If I perform, on the console, this stupide code : db = ctiveRecord::Base.connection db.execute( db.execute(CREATE TABLE toto (id int); DROP TABLE

[Rails] Re: mysql adapter 2 statments

2010-05-03 Thread Laurent Buffat
db = ActiveRecord::Base.connection db.execute(CREATE TABLE toto (id int); DROP TABLE toto;) Sorry for this typo. Laurent -- 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

[Rails] Re: rendering images dynamically

2010-05-03 Thread candor
I tried a couple other approaches, but no success yet: 1. I reversed the blocks below - calling the load_images from within render :update - that did give me the results, but all at once in the end, not as the images show up. 2. I called redirect_to controller/show_image?image_id=1 within the

Re: [Rails] Re: rendering images dynamically

2010-05-03 Thread Rob Biedenharn
On May 3, 2010, at 1:49 PM, candor wrote: I tried a couple other approaches, but no success yet: 1. I reversed the blocks below - calling the load_images from within render :update - that did give me the results, but all at once in the end, not as the images show up. 2. I called redirect_to

[Rails] how-to display an image living outside the public directory

2010-05-03 Thread bill walton
I'm trying to display an image (chart) that lives outside the public directory in RAILS_ROOT/private. The chart contains confidential information and so can't live in /public or any sub-directories of /public. The chart needs to be displayed from a partial. The first display of the page

[Rails] Re: how-to display an image living outside the public direct

2010-05-03 Thread Robert Walker
bill walton wrote: I'm trying to display an image (chart) that lives outside the public directory in RAILS_ROOT/private. You probably looking for send_file: http://railsapi.com/doc/rails-v2.3.5/classes/ActionController/Streaming.html#M001587 -- Posted via http://www.ruby-forum.com/. -- You

Re: [Rails] Re: rendering images dynamically

2010-05-03 Thread Anand Ramanathan
Thanks, Rob I tried a variant of your suggestion, where I redirect instead of send_data (since in my case, the images are coming from elsewhere) - I still have the same issue (that the images are all rendered once in the end,not one by one as they are retrieved). Here is the current code: main

Re: [Rails] Re: rendering images dynamically

2010-05-03 Thread Rob Biedenharn
On May 3, 2010, at 3:20 PM, Anand Ramanathan wrote: Thanks, Rob I tried a variant of your suggestion, where I redirect instead of send_data (since in my case, the images are coming from elsewhere) - I still have the same issue (that the images are all rendered once in the end,not one by

[Rails] duplicate inserts with field_for and has_many :through

2010-05-03 Thread oren
I see 2 inserts of KeyValue rows on TranslationValue#create action (and I should only have one). it inserts identical values. Here are my models, the edit template, the create action and the log: models: class TranslationKey ActiveRecord::Base has_many :key_values has_many

[Rails] Nested Form - Not Posting... HELP!?!?!

2010-05-03 Thread KT
I have a nested form for survey responses, but the form data is not being posted to the table; I get no errors, just null values for the data from params ('question_id', 'answer_id' and 'note)'. Please help!!! And thanks in advance !!

Re: [Rails] Re: database.yml: encoding: utf8 does not work

2010-05-03 Thread Jeffrey L. Taylor
Quoting Edmond Chui li...@ruby-forum.com: Joshua Muheim wrote: Hi all According to the Agile 2nd Ed book I added the line encoding: utf8 to my database.yml connections. But now when running rake I get plenty of errors: Character set 'utf-8' is not a compiled character set and

[Rails] Integration with two rails applications

2010-05-03 Thread Diego Bernardes
Ive build a academic application where users can open tickets, something like a help desk. I want this tickets to be opened in Redmine, when the tickets get updated on Redmine, update on my software too, when the user update on my software, update in redmine. I thinking in how to do this in a

Re: [Rails] Re: rake TEST=test/unit/whatever_test.rb is executed 3 times.

2010-05-03 Thread Peter Hickman
Or you could try rake test:units TEST=test/unit/whatever_test.rb if it is a unit test for example -- 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: struggling with accepts_nested_attributes_for

2010-05-03 Thread kc00l
You're right, Response is a perfect valid name for a column name, I just never used a capitalized string for a column name :) Anyway, I just reproduced your app according to the (little) details you've given. It just works fine. This my input tag for a blank response_item for a new Item : input

Re: [Rails] Re: rendering images dynamically

2010-05-03 Thread Anand Ramanathan
Thanks again, Rob I made the change you suggested (I realize that the additional action call and redirect are redundant), and I still get the images rendering all at once in the end. I am a newbie to rails, so dont understand fully how it works, but here are my current confusions : 1. Does all

Re: [Rails] Re: how-to display an image living outside the public direct

2010-05-03 Thread bwalton.im
Hi Rob, On Mon, May 3, 2010 at 2:11 PM, Robert Walker li...@ruby-forum.com wrote: bill walton wrote: I'm trying to display an image (chart) that lives outside the public directory in RAILS_ROOT/private. You probably looking for send_file: Yeah. I was trying to use send_data and it

[Rails] install ing rails

2010-05-03 Thread Daniel Perrett
Hi all, I'm having trouble installing rails onto my machine . i have a Solaris 10 x86 box, ruby version 1.8.6 gem version 1.2.0. when I try to install rails using gems with the command line: gem install rails It throws this: root# gem install rails ERROR: While executing gem ...

[Rails] How to read config on rails?

2010-05-03 Thread Wason Wang
How to set and read config settings on rails? For example: a path to be get by a variable. -- 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

Re: [Rails] Re: rendering images dynamically

2010-05-03 Thread Rob Biedenharn
On May 3, 2010, at 4:56 PM, Anand Ramanathan wrote: Thanks again, Rob I made the change you suggested (I realize that the additional action call and redirect are redundant), and I still get the images rendering all at once in the end. I am a newbie to rails, so dont understand fully how

[Rails] mongrel issue dev vs. prod

2010-05-03 Thread Me
I can start this app in dev mode fine but it blows up when I do -e production. Here is what I get from the brief output in the cli: No idea what is going on and why it would do that in prod mode. F:/BACKUP/Backup/ruby/lib/ruby/1.8/erb.rb:441:in `scan': undefined method `empty?' for

[Rails] Best HOST and web server

2010-05-03 Thread David Zhu
Ok im currently trying to choose between Apache/Nginx, and other stuff too (passenger, etc) Could someone give me a brief description/explanation of which one to use? What do you prefer? Pros/Cons? Also, whats ur fav VPS company? Do you think that Rackspace Cloud is good? Anyone tried it? --

[Rails] Re: render_to_string problem

2010-05-03 Thread Punit Rathore
Are you escaping the javascript returned?(by calling the escape_javascript helper?) Abhishek shukla wrote: i have a scenario where a jquery is receiving a response in the string and which content html component like div id=\test\test/div ideally in a view it should display only test but

[Rails] Re: Link_to delete action

2010-05-03 Thread Punit Rathore
The reason it is failing is because it is performing a GET request. Wrap the delete relationship in a form( with :method = :delete) and it should work -- Punit Greg Ma wrote: Hi, I am trying to generate a link to delete a relationship, so I've done the code bellow. THis is the full code,

[Rails] Helper module not included on subsequent requests form engine gem in development from passenger

2010-05-03 Thread Walter McGinnis
Hi, I'm working on a Rails 2.3.5 based gem that acts as an add-on for an existing application. It basically pulls in functionality from another more generic gem and sets up the application to use it. In its rails/init.rb it adds some helpers to ApplicationHelper. Here's the init.rb file:

Re: [Rails] Best HOST and web server

2010-05-03 Thread Philip Hallstrom
Ok im currently trying to choose between Apache/Nginx, and other stuff too (passenger, etc) Could someone give me a brief description/ explanation of which one to use? What do you prefer? Pros/Cons? I use apache/passenger. I've stuck with Apache because I've got some PHP stuff and don't

[Rails] select tag with unique values from db

2010-05-03 Thread Kris Mojica
Hi. I just want to ask some help regarding my simple project. i'm a rails newbie and right now, quite stuck with this. I have this select_tag in my rhtml.. %= select_tag 'search[outcome]', options_for_select([, qp1, qp2, Not Processed], (params[:search] params[:search][:outcome])) % it works

[Rails] OneLogin releases SAML for Ruby

2010-05-03 Thread Thomas Pedersen
We have just published a neat little toolkit for those of you who are interested in SAML-enabling your enterprise application. SAML is a standards-based single sign-on protocol, which allows an identity provider to securely log users into an application without a password. Some of the advantages

[Rails] Getting class in /lib folder to see a model (const_missing)?

2010-05-03 Thread Mike P.
Hello, I wrote a new class that I decided to put in the /app/lib folder. Part way through one of the methods, I call #new on the model, update some of the fields and then call #save (on the model). When I do this though, I get a 'const_missing' error coming from Active Support. Here's the error:

Re: [Rails] how-to display an image living outside the public directory

2010-05-03 Thread Vladimir Rybas
You could have PrivateImagesController with `show` method and you will get your images through /private_images/image_name.png in `show` method (check permissions) send_file #{RAILS_ROOT}/private_images_folder/#{params[:image_name]} send_file is really slow and will work only when

Re: [Rails] Best HOST and web server

2010-05-03 Thread Vladimir Rybas
I'm using Nginx + Thin See here: http://webroar.in/blog/2009/11/25/comparison-of-rails-deployment-stacks-2/ I didn't try WebRoar. But Thin is the best among others. I believe nobody would argue that Nginx is faster than Apache though. I've got VDS on RackspaceCloud about a year now. Had no

[Rails] Integrating hardware with browser

2010-05-03 Thread pepe
Hello, I've looked high and low and found just 1 post with some information about this subject, from 2008, and Google searches turned out pretty much no useful information. I would appreciate any help on this. I need to be able to control several devices (card reader, printer, camera, cashier

[Rails] Re: Having trouble with Validatable

2010-05-03 Thread Bob Smith
I think that's what I did. I know the gem is running because I had validates_numericality using minimum and maximum, which broke as soon as I installed the gem. Validatable doesn't have those options. The include is on line 2 of the model. Bob On May 3, 6:53 am, Priyanka Pathak

[Rails] What version of Ruby does/will Rails 3 require?

2010-05-03 Thread Matt Slay
What version of Ruby does or will Rails 3 require? -- 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

Re: [Rails] Re: rendering images dynamically

2010-05-03 Thread Anand Ramanathan
Thanks, Rob I finally got it working by using periodically_call_remote in conjunction with the spawn plugin which runs the long process in parallel. Thanks for your help! Anand On Mon, May 3, 2010 at 2:12 PM, Rob Biedenharn r...@agileconsultingllc.comwrote: On May 3, 2010, at 4:56 PM, Anand

Re: [Rails] What version of Ruby does/will Rails 3 require?

2010-05-03 Thread Conrad Taylor
Sent from my iPhone On May 3, 2010, at 9:32 PM, Matt Slay li...@ruby-forum.com wrote: What version of Ruby does or will Rails 3 require? Matt, Rails 3 requires Ruby 1.8.7 at the absolute minimum but works best with Ruby 1.9.2. Good luck, -Conrad -- Posted via

[Rails] Couldn’t get bounced email id in “Failur e delivery notice”

2010-05-03 Thread sathishkumar
Hi All, We have an email receiver component to receive mails. We couldn’t get the bounced email id from “failure delivery notice” email. Scenario: In email receiver, we need to process the bounced emails separately as in it needs to be tracked and take a action to stop sending emails to

Re: [Rails] Couldn’t get bounced email id in “Fa ilure delivery notice”

2010-05-03 Thread Mikel Lindsaar
On 4, May 2010, at 4 May 15:42, sathishkumar wrote: Question: Can you please anyone suggest me, how to find out the email-id which is failed to deliver / invalid one from that bounced email notice. The most fool proof way to do this is to get the message-id of the mail you have sent, and