[Rails] Re: Rails Library for Generating Graphs and Charts

2009-09-23 Thread Brijesh Shah
Use gruff charts or google charts... Gruff Charts: http://nubyonrails.com/pages/gruff google charts: http://blog.brijeshshah.com/google-chart-4-rails-gc4r/ This plugins helps you generating charts in form of images.. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~

[Rails] Search Pluging , Acts_as_ferret with conditions

2009-09-23 Thread Neetal Sharma
I have a search feature in my application. I was using acts_as_ferret , i tried all possible ways to include the conditions with it. Model.find_with_ferret(query, :conditions =>{}) But dint succeed in it. So please some one help me with this , or else please suggest a good search plugin which in

[Rails] Re: Parameter passing problem ..

2009-09-23 Thread Hemant Bhargava
Ok.. The thing is i am adding a new tailor and adding his phone number. Now if he has more than one number then he have to create a text box himself by clicking on add more phone number. Now If he clicked text box is created. Even in firefox i had seen that id and names are there what i want.

[Rails] Re: secure ruby, rails programming

2009-09-23 Thread Fidel Viegas
On Wed, Sep 23, 2009 at 6:47 PM, Rajinder Yadav wrote: > > [This is a cross-post, was told I would have better luck here than on > ruby-talk] > > Hello Community, > > I am just learning Ruby and Rails and would like to know what good > security ruby gems are out there that will help me keep data

[Rails] Re: Ordered Sets in Ruby

2009-09-23 Thread Fidel Viegas
Never mind, Trial and error and managed to install it. Thanks! Fidel. On Thu, Sep 24, 2009 at 6:49 AM, Fidel Viegas wrote: > On Sun, Sep 20, 2009 at 1:28 AM, E. Litwin wrote: >> >> Take a look at acts_as_list - http://github.com/rails/acts_as_list >> > > Hi Litwin, > > I have cloned the git

[Rails] Re: Ordered Sets in Ruby

2009-09-23 Thread Fidel Viegas
On Sun, Sep 20, 2009 at 1:28 AM, E. Litwin wrote: > > Take a look at acts_as_list - http://github.com/rails/acts_as_list > Hi Litwin, I have cloned the git file to my hard drive, and tried running the init.rb, but that has given me this error: init.rb:3: uninitialized constant ActiveRecord::Ba

[Rails] Re: Rails Authentication Tutorial

2009-09-23 Thread Conrad Taylor
Hi, why don't you simply post a detail description of the issue(s) that you're having with the gem/plugin? -Conrad Sent from my iPhone On Sep 23, 2009, at 8:35 PM, Kevin M wrote: > > Does anyone know a good authentication tutorial they can suggest? I've > tried several restful authenticatio

[Rails] Re: Rails Authentication Tutorial

2009-09-23 Thread Marnen Laibow-Koser
Kevin M wrote: > Does anyone know a good authentication tutorial they can suggest? I've > tried several restful authentication ones and an authlogic one on > RailsCast. But with each one I try, something seems to be missing in > the tutorial and I can't get it to work. I'm new to Rails so it's > p

[Rails] Rails Authentication Tutorial

2009-09-23 Thread Kevin M
Does anyone know a good authentication tutorial they can suggest? I've tried several restful authentication ones and an authlogic one on RailsCast. But with each one I try, something seems to be missing in the tutorial and I can't get it to work. I'm new to Rails so it's possible user error on my

[Rails] Unable to do a count on named_scope

2009-09-23 Thread David Chua
Hi all, I'm not sure if this is a bug, but I'm having some problem doing a count, on a named_scope. class Claim < ActiveRecord::Base has_many :items belongs_to :event before_save :add_pv accepts_nested_attributes_for :items, :allow_destroy => true named_scope :pending, :conditions => {

[Rails] How to generate password automatically using authlogic..

2009-09-23 Thread Thriving K.
I have problem , i want to generate password automatically where can i manipulate :password and :confirm_password in action create def create @user = User.new(params[:user]) if @user.save flash[:notice] = "Registration successful." redirect_to root_url else rende

[Rails] [ANN] ActiveSupport-GemFireCache a Jruby/Rails Plugin

2009-09-23 Thread straightfl...@gmail.com
Hello, Just wanted to let the community know that I put some time/effort into building a basic Jruby/Rails plugin that will allow you to replace the cache_store with one specific for the Gemfire Cache Server. For those not familiar with Gemfire, its an enterprise grade memory caching fabric wit

[Rails] Re: How ActiveRecords create tables

2009-09-23 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: > Cris Shupp wrote: [...] >> How come I cannot write the code as follows (Aptana will not compile >> it)? >> def self.up >> create_table (:people,{|t| >> t.string :name, :type, :email, :camera >> t.timestamps >> }) >> end > > Because you've got y

[Rails] Re: text_field_with_auto_complete passing parameters

2009-09-23 Thread The Ultimation
Well I finally figured this out on my own if anyone else reads this. My solution was as follows: <%= text_field_with_auto_complete :profile, :lastname, {}, {:url=>{:action=>'auto_complete_for_profile_lastname', :conference_id => @conference.id}}%> By changing the url, I was able to pass a par

[Rails] [ANN] Call for papers for the Spanish Rails Conference 2009

2009-09-23 Thread javier ramirez
Hi, For the fourth year in a row, we are pleased to announce this year's edition of the Spanish Rails Conference [1], to be held in Madrid, Spain, on November 26th and 27th. Call for papers finishes by September 29th (sorry about the short notice). If you would like to submit a proposal for a tal

[Rails] Overriding AR read/write_attribute - Overridden write_attribute Is Never Called

2009-09-23 Thread MaggotChild
Could someone explain this? #config/initializers/ar_attributes.rb module ActiveRecord module AttributeMethods alias_method :ar_read_attribute, :read_attribute def read_attribute(attr_name) p "read_override" ar_read_attribute(attr_name) end alias_method

[Rails] secure ruby, rails programming

2009-09-23 Thread Rajinder Yadav
[This is a cross-post, was told I would have better luck here than on ruby-talk] Hello Community, I am just learning Ruby and Rails and would like to know what good security ruby gems are out there that will help me keep data sent over the wire secure or stored on a server secure vs plain old te

[Rails] Re: Find the gems and plugins used in Rails Application

2009-09-23 Thread xiexie11
If you just want to see what your app is using and you haven't used config gem with the versions set, you can use the console and run: Rails.configuration.gems.sort{|a,b| a.specification.name <=> b.specification.name}.collect{|g| "#{g.specification.name} - # {g.specification.version}"} On Sep 18

[Rails] Re: FFMPEG Query

2009-09-23 Thread Michael Slade
Hi Salil, I use the aws/s3 Ruby gem (http://amazon.rubyforge.org/) to download the file and then operate on it locally. In my case I'm doing it from an EC2 instance so there's no charge for the file transfer and it is pretty fast. Good luck, Michael Slade msl...@adlibmedia.com On Sep 23, 12:33 

[Rails] Re: Running App in Production Env

2009-09-23 Thread Adam Meyer
Marnen Laibow-Koser wrote: > Adam Meyer wrote: >> Okay, I got it, but please do not ask how. > > I'll bite. How? > >> There was a problem with the migration to production.sqlite3 but I fixed >> it! > > And the problem was...? And you fixed it by...? > >> >> Thanks dude! > > Best, > -- > M

[Rails] Re: Running App in Production Env

2009-09-23 Thread Marnen Laibow-Koser
Adam Meyer wrote: > Okay, I got it, but please do not ask how. I'll bite. How? > There was a problem with the migration to production.sqlite3 but I fixed > it! And the problem was...? And you fixed it by...? > > Thanks dude! Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen

[Rails] Re: Running App in Production Env

2009-09-23 Thread Adam Meyer
Okay, I got it, but please do not ask how. There was a problem with the migration to production.sqlite3 but I fixed it! Thanks dude! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

[Rails] Re: Running App in Production Env

2009-09-23 Thread Vamsi krishna Kilari
Colin Law wrote: > 2009/9/23 Vamsi krishna Kilari : >> > Would you expect it to work on the server in dev mode but not in > production if that were the problem? > > Colin oops I thought he meant to say dev server. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~-

[Rails] Re: Running App in Production Env

2009-09-23 Thread Vamsi krishna Kilari
Colin > Would you expect it to work on the server in dev mode but not in > production if that were the problem? >From rails 2.3.0 application.rb is renamed to application_controller.rb which you are aware of. And passenger <=2.0.3 looks for application.rb and higher versions looks for applicati

[Rails] Re: Routes requirements exclude one character

2009-09-23 Thread Marnen Laibow-Koser
Matt Jones wrote: > The regexp you've specified here will match as long as there are at > least two consecutive non-space characters. I would have thought so, but the routing docs suggest that the regex is implicitly anchored at both ends (look at the postalcode example). > The only way I can t

[Rails] Re: auto_complete text field not showing drop-down box properly

2009-09-23 Thread Bryan
Sounds to me like you're missing styling. I use http://github.com/grosser/simple_auto_complete that comes with an example CSS that works just fine for me. That might give you some clues, but you'll probably have to modify it to work with the provided classes and ids. --~--~-~--~~--

[Rails] Re: Running App in Production Env

2009-09-23 Thread Colin Law
2009/9/23 Vamsi krishna Kilari : > > Adam. > >> *** [err :: kwikit.de] no such file to load -- application > Seems like an issue with rails n passenger version. Can you simlink the > application.rb to application_controller.rb and it should work fine. > > cd RAILS_ROOT/app/controller > > ln -s app

[Rails] Re: How ActiveRecords create tables

2009-09-23 Thread Marnen Laibow-Koser
Cris Shupp wrote: > I'll start off by saying I am new to Ruby and Rails... You might find it helpful to read about Ruby's object model in general. It's subtly different from those of most other OO languages. > > Suppose I run the following; > > $ script/generate model person > > > which cre

[Rails] Re: Running App in Production Env

2009-09-23 Thread Vamsi krishna Kilari
Adam. > *** [err :: kwikit.de] no such file to load -- application Seems like an issue with rails n passenger version. Can you simlink the application.rb to application_controller.rb and it should work fine. cd RAILS_ROOT/app/controller ln -s application_controller.rb application.rb Thanks, K

[Rails] Re: Running App in Production Env

2009-09-23 Thread Colin Law
2009/9/23 Adam Meyer : > > Colin Law wrote: > >> >> What is the name of your application controller? >> Are you sure it is running with the same version of rails as in >> development? >> If so how do you know? >> >> Colin > > > Hey Colin > > sorry but I don't understand your questions? You should

[Rails] problem with ActionMailer/SMTP

2009-09-23 Thread Paŭlo Geyer
hi, i'm trying to make the user account confirmation work in my site, but i couldn't fix this error, Processing UsersController#create (for 189.85.180.50 at 2009-09-23 16:44:30) [POST] Parameters: {"commit"=>"Criar novo usuário", "authenticity_token"=>"UX+z7gZGHLo5+1LkW0duFvu69YiHC7H0baMY/Sbtyi

[Rails] Re: Running App in Production Env

2009-09-23 Thread Adam Meyer
Colin Law wrote: > > What is the name of your application controller? > Are you sure it is running with the same version of rails as in > development? > If so how do you know? > > Colin Hey Colin sorry but I don't understand your questions? I already deployed the app a couple of times to m

[Rails] Re: Routes requirements exclude one character

2009-09-23 Thread Matt Jones
The regexp you've specified here will match as long as there are at least two consecutive non-space characters. The only way I can think of to do what you're looking for would be to add a route preceding this one which matches any :plan WITH a space, and routes it to an error page. EG: map.bad_de

[Rails] Re: auto_complete text field not showing drop-down box properly

2009-09-23 Thread John Woods
Hi Mark, Thanks. I'll give that a try, but it seems strange that it should even happen; my view is simply: <%= auto_complete_result @campuses, :name %> Shouldn't that be formatting it correctly? On Sep 23, 11:25 am, Mark Mr wrote: > this might sound weird, but in your view of the list try put

[Rails] How ActiveRecords create tables

2009-09-23 Thread Cris Shupp
I'll start off by saying I am new to Ruby and Rails... Suppose I run the following; $ script/generate model person which creates: class CreatePeople < ActiveRecord::Migration def self.up create_table :people do |t| t.timestamps end end def self.down drop_table :peopl

[Rails] Re: Running App in Production Env

2009-09-23 Thread Colin Law
2009/9/23 Adam Meyer : > > Hi everyone, > > yesterday I switched the environment on my production server from dev to > prod via changing the vhost file for the Apache. > > I changed > > RailsEnv development > > to > > RailsEnv production > > and deployed the application via capistrano. > > But now

[Rails] Re: Autoincrement

2009-09-23 Thread Colin Law
2009/9/23 doug : > > I am using SQLite 3.  I have deleted all of the rows of a member table > but one.  The one row that remains is for the administrative user and > has an id of 0.  I'd sure like to zero out the autoincrement counter. > The documentation for SQLite contains the following warning:

[Rails] Running App in Production Env

2009-09-23 Thread Adam Meyer
Hi everyone, yesterday I switched the environment on my production server from dev to prod via changing the vhost file for the Apache. I changed RailsEnv development to RailsEnv production and deployed the application via capistrano. But now I get a passenger error see at http://test.kwikit

[Rails] Re: Autoincrement

2009-09-23 Thread Aldric Giacomoni
Doug Jolley wrote: >> Can you afford to make a copy of the SQLite file and -try-.. And then >> report back to us? ;-) > > I am pleased to report that it seems to work just fine. The warning > still scares me. I'm afraid that I am going to get unexpectedly > bitten some day. The warning is expr

[Rails] Re: Moving to another database system

2009-09-23 Thread Marnen Laibow-Koser
Aldric Giacomoni wrote: > So, I developed what I considered a mini application for my department > back in June. I used SQLite3. The file is still very small - about 2.5 > megs - but I'd like to move to something else which supports multiple > simultaneous read/writes better than SQLite3. Yeah.

[Rails] Re: Moving to another database system

2009-09-23 Thread Aldric Giacomoni
What? No pre-chewed answer for me? I have to go read the docs? What ignominy is this? Alright - thanks ;) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: T

[Rails] Re: Autoincrement

2009-09-23 Thread djolley
> Can you afford to make a copy of the SQLite file and -try-.. And then > report back to us? ;-) I am pleased to report that it seems to work just fine. The warning still scares me. I'm afraid that I am going to get unexpectedly bitten some day. The warning is expressly directed to those who d

[Rails] Re: Moving to another database system

2009-09-23 Thread Fidel Viegas
On Wed, Sep 23, 2009 at 7:09 PM, Aldric Giacomoni wrote: > > So, I developed what I considered a mini application for my department > back in June. I used SQLite3. The file is still very small - about 2.5 > megs - but I'd like to move to something else which supports multiple > simultaneous read/

[Rails] Re: Authlogic administration

2009-09-23 Thread Marnen Laibow-Koser
the batman wrote: > Whats the best way to use administration with authlogic? > > I have a single admin role and a limited users role. > The admin section is namespaced. > > Is using a plugin like lockdown or declarative_authorization a good idea > or overkill for only having 2 seperate roles? A

[Rails] Moving to another database system

2009-09-23 Thread Aldric Giacomoni
So, I developed what I considered a mini application for my department back in June. I used SQLite3. The file is still very small - about 2.5 megs - but I'd like to move to something else which supports multiple simultaneous read/writes better than SQLite3. What do I need to do? Clearly, rake wil

[Rails] Re: Autoincrement

2009-09-23 Thread Aldric Giacomoni
Well, I am not a SQLite developer, but now I am -very- curious as to what that would do. Can you afford to make a copy of the SQLite file and -try-.. And then report back to us? ;-) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received thi

[Rails] Autoincrement

2009-09-23 Thread doug
I am using SQLite 3. I have deleted all of the rows of a member table but one. The one row that remains is for the administrative user and has an id of 0. I'd sure like to zero out the autoincrement counter. The documentation for SQLite contains the following warning: The content of the SQLITE

[Rails] Re: link_to_function and link_to_remote

2009-09-23 Thread tomrossi7
Vlad, I think you may want to check out the :with option for the link_to_remote. It will allow you to pass back to the controller the comment.id for the link that was clicked. Is that what you mean? --Tom On Sep 23, 1:03 pm, Vlad Khomich wrote: > Hi guys. I`m having this kind of problem: > >

[Rails] Connecting to MS SQL from Snow Leopard

2009-09-23 Thread TomRossi7
Has anyone been able to get Rails talking to Microsoft SQL Server from OSX Snow Leopard? In the past with Leopard, I used the instructions found here: http://wiki.rubyonrails.org/database-support/ms-sql. But with Snow Leopard I get the following error when I try to access an ActiveRecord object:

[Rails] Re: RedCloth Changing Features

2009-09-23 Thread Joe
Ok first sorry for the bump, its just I was rather desperate. Secondly, Thanks for the advice and I will use it to fix my recloth issue. Thanks, Joe On Sep 23, 4:03 pm, Marnen Laibow-Koser wrote: > Joe wrote: > > Hi, I basically run a very simple RoR app which works using RedCloth's > > texti

[Rails] Re: mysql

2009-09-23 Thread Daniel Hutchinson
Daniel Hutchinson wrote: Solved! I decide to new post because I posted with MySQL title which dont say nothing about the real problem So when i get the message "Client does not support authentication protocol requested by server; > consider upgrading MySQL client" or after run rake db:creat

[Rails] Re: Dreamhost launch issues. What gems are used in my rails

2009-09-23 Thread Tony Tony
The Ultimation wrote: > for migrations, have you tried running rake db:migrate > RAILS_ENV=production ? That may or may not work. As far as the plugins > go, you shouldnt need gems to make them work, or if you did you would > only get an error when trying to use them. I believe paperclip does

[Rails] Rails Library for Generating Graphs and Charts

2009-09-23 Thread Piyush with Rails
Hello Friends, Hope all are doing well. I was seeking some guidance on open-source, stable, efficient and better library (plugin/gem) for generating chars and graphs in rails. here i am looking for graphs/charts with multiple scale in a single axis. also i am having concerns for exporting chart

[Rails] Rails Library for Generating Graphs and Charts

2009-09-23 Thread Piyush with Rails
Hello Friends, Hope all are doing well. I was seeking some guidance on open-source, stable, efficient and better library (plugin/gem) for generating chars and graphs in rails. here i am looking for graphs/charts with multiple scale in a single axis. also i am having concerns for exporting chart

[Rails] Re: So I"m sure someone has come across this before...but how do you fix the gem_original_require p

2009-09-23 Thread Mike Younesi
Ron wrote: > I get this when trying to install gems: > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- rdoc/rdoc (LoadError) > > The trouble is, I also get it when trying to install rubygems...so I > wound up installing 0.9.4. I can

[Rails] link_to_function and link_to_remote

2009-09-23 Thread Vlad Khomich
Hi guys. I`m having this kind of problem: i have the comments tree, there`s this link_to_function under each one: link_to_function "Reply", "$('comment_parent_id').setValue(#{comment.id});" as you see it simply passes comment.id to my form. Form looks like this : <%form_for :comment, :url =>

[Rails] Re: Dreamhost launch issues. What gems are used in my rails

2009-09-23 Thread Mark Mr
for migrations, have you tried running rake db:migrate RAILS_ENV=production ? That may or may not work. As far as the plugins go, you shouldnt need gems to make them work, or if you did you would only get an error when trying to use them. I believe paperclip does require ImageMagick though. Yo

[Rails] Re: How to use remote_form_tag?

2009-09-23 Thread Alexander Melle
Hi Patrick, if i understand correctly you want to have 2 select boxes that are depending. So the second one changes it's content mased on the first one ... Took me some time to find out ... The trick was to put the second select into it's own partial : the view would look like this : [code]

[Rails] Authlogic administration

2009-09-23 Thread the batman
Whats the best way to use administration with authlogic? I have a single admin role and a limited users role. The admin section is namespaced. Is using a plugin like lockdown or declarative_authorization a good idea or overkill for only having 2 seperate roles? thanks -- Posted via http://www.

[Rails] Re: auto_complete text field not showing drop-down box properly

2009-09-23 Thread Mark Mr
this might sound weird, but in your view of the list try putting everything on the same line i.e.: somthing Becomes: something I think I remember that fixing my problem, although it might not work for you. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~

[Rails] Re: How to use remote_form_tag?

2009-09-23 Thread Patrick Doyle
Just in case anybody is interested in this thread... here is what I got to work for me: <% form_remote_tag :url => "select_assembly", :update => "disposition" do %> <%= disposition_select_tag "use_part", @parts, @use_part %> <% if @use_part %> <%= disposition_select_tag "use_lot", @lots,

[Rails] Re: activerecord get next element

2009-09-23 Thread mickeyben
nice one ! Thanks On Sep 23, 6:26 pm, Tim Lowrimore wrote: > Actually the calls should look like this: > previous = Foo.for_status(true).find_previous(3).last > next = Foo.for_status(true).find_subsequent(1).first > > So, the .last and .first calls were transposed. > > Cheers, > Tim > > On Wed,

[Rails] text_field_with_auto_complete passing parameters

2009-09-23 Thread Mark Mr
Hi, I've run into a problem with text_field_with_auto_complete because I can't figure out how to just pass a parameter into the method. For example, here's what i want to try and do: <%= text_field_with_auto_complete :profile, :lastname, :conference_id => @conf %> And in the method I'm doing thi

[Rails] Re: Dreamhost launch issues. What gems are used in my rails

2009-09-23 Thread Tony Tony
Colin Law wrote: > 2009/9/23 Tony Tony : >> database for production (same schema) and the site still fails to load. >> page just in case, Any help is appreciated!!: >> no such file to load -- application (MissingSourceFile) >> 2 >> 133  in `require_dependency' >> /usr/lib/ruby/gems/1.8/gems/active

[Rails] Re: Dreamhost launch issues. What gems are used in my rails

2009-09-23 Thread Tony Tony
Heinz Strunk wrote: > Have you tried to run > > rake gems:install > > on the server to install all required gems? Yea tried that - there was nothing to install. I think I just figured out what's partly wrong. I had to install rails 2.3.3 on DH. Now I'm getting a different error. Thanks! --

[Rails] Re: Dreamhost launch issues. What gems are used in my rails app?

2009-09-23 Thread Colin Law
2009/9/23 Tony Tony : > > Hi guys, > > I made a quick app for a family member to be deployed on Dreamhost (low > budget). It's my first time deploying on DH so I'm not familiar with the > restrictions. > > I'm having an issue where I've been able to get git on both systems and > used capistrano to

[Rails] Re: Determine type in polymorphic relation

2009-09-23 Thread Ilan Berci
Heinz Strunk wrote: > First of all thank you guys! I think what Valentin wrote is just what I > was looking for. Person, Car, Truck was just an example. It's a lot more > complexe in my application and you can't just merge these two different > models into one and add a :type. > > I'll do it l

[Rails] Re: Dreamhost launch issues. What gems are used in my rails app?

2009-09-23 Thread Heinz Strunk
Have you tried to run rake gems:install on the server to install all required gems? -- 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

[Rails] Re: how to truncate tables before seeding data?

2009-09-23 Thread Heinz Strunk
Yes, but I want it to happen automatically so I think Abhinavs code snippet is exactly what I was looking for. Thanks! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Running Ror application from Tomcat

2009-09-23 Thread Simone R.
We just did it by following this step-by-step guide http://adams.id.au/blog/2008/05/running-a-rails-app-under-tomcat-using-jruby/ if anyone was waiting for a hint I can say that this guide it worked for me. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~

[Rails] Re: Determine type in polymorphic relation

2009-09-23 Thread Heinz Strunk
First of all thank you guys! I think what Valentin wrote is just what I was looking for. Person, Car, Truck was just an example. It's a lot more complexe in my application and you can't just merge these two different models into one and add a :type. I'll do it like Valentin suggested. Thanks a

[Rails] Solved "Client does not support authentication protocol.."

2009-09-23 Thread Daniel Hutchinson
I decide to new post because I posted with MySQL title which dont say nothing about the real problem So when i get the message "Client does not support authentication protocol requested by server; > consider upgrading MySQL client" or after run rake db:create get error message "could create

[Rails] Re: RJS file not rendering

2009-09-23 Thread Aaron Vegh
Hi again, Bah, turns out I had the right files in the wrong folder. I have an admin/stores folder and a plain old stores folder, and my partials and RJS were in the admin version Stupid! Thanks, Aaron. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~-

[Rails] Re: activerecord get next element

2009-09-23 Thread Tim Lowrimore
Actually the calls should look like this: previous = Foo.for_status(true).find_previous(3).last next = Foo.for_status(true).find_subsequent(1).first So, the .last and .first calls were transposed. Cheers, Tim On Wed, Sep 23, 2009 at 10:05 AM, Tim Lowrimore wrote: > Better yet. Take these condi

[Rails] Re: activerecord get next element

2009-09-23 Thread Tim Lowrimore
Better yet. Take these conditions and apply each as a named scope. Then, by chaining the calls you'll get everything in one nice little query. So for example (assuming a default order of: "id ASC"): In your model (lets call it Foo): named_scope :for_status, lambda { |status|

[Rails] failed validation not showing the errors but vars

2009-09-23 Thread Heinz Strunk
Hello, I have a remote_form_for and got a strange validation error: ### Konnte dieses new activity Objekt nicht speichern: 2 Fehler. Bitte überprüfen Sie die folgenden Felder: * {{attribute}} {{message}} * {{attribute}} {{message}} ###

[Rails] Re: RJS file not rendering

2009-09-23 Thread Tim Lowrimore
Try renaming cities.rjs to cities.js.rjs. Rails is smart enough to know that it's getting a JS request, so there's no need to tell Rails to what template to use as long as the controller method and view template follow the standard naming convention. Tim On Tue, Sep 22, 2009 at 5:36 PM, bill walt

[Rails] Re: ActiveRecord::StatementInvalid (invalid date) with Oracle

2009-09-23 Thread pepe
I don't know if this could help but I had kind of a similar problem at one point. After much research I ended up coming across a solution by which you can modify in your model the value returned from the DB. You have to override the reader method (code below). This worked for me only when reading

[Rails] Re: RedCloth Changing Features

2009-09-23 Thread Marnen Laibow-Koser
Joe wrote: > Hi, I basically run a very simple RoR app which works using RedCloth's > textilizing system. > > I would just like to know if there is a way to edit for example the > *e.g* making things emphisised ect. I want to basically remove all > the functions and things like that, as I want t

[Rails] Re: Determine type in polymorphic relation

2009-09-23 Thread pepe
I'm not sure of what you need to do but I'll assume that you just want to create an association between a person and a vehicle of type car or truck (or whatever). I am assuming that you have STI built into your vehicles table, with a column named 'type' that stores the type of vehicle ('Car'/'Tru

[Rails] Re: ActiveRecord::StatementInvalid (invalid date) with Oracle

2009-09-23 Thread Martijn van Rheenen
Finally, I found the error with 'invalid date' on Oracle 8. Seems that oracle not only allows 'null' dates, but also 'empty' dates. On 'empty' dates, the error would come up! Below is what I changed in oracle_enhanced_oci_connection.rb in lib\ruby\gems\activerecord-oracle_enhanced-adapter-1.2.1\li

[Rails] Re: mysql

2009-09-23 Thread Daniel Hutchinson
heimdull wrote: > I have seen the fix for this be one of the following: > > if you have charset: utf8 change that to encoding > or use 127.0.0.1 and not localhost > or permissions for the user in the database (create table is a good > one to have... ) > > On Sep 22, 4:52�pm, Daniel Hutchinson SQ

[Rails] Re: RedCloth Changing Features

2009-09-23 Thread Joe
Anyone know how to do this? or another way of acheving the tags being proccessed?? On Sep 22, 6:48 pm, Joe wrote: > Hi, I basically run a very simple RoR app which works using RedCloth's > textilizing system. > > I would just like to know if there is a way to edit for example the > *e.g*  makin

[Rails] Dreamhost launch issues. What gems are used in my rails app?

2009-09-23 Thread Tony Tony
Hi guys, I made a quick app for a family member to be deployed on Dreamhost (low budget). It's my first time deploying on DH so I'm not familiar with the restrictions. I'm having an issue where I've been able to get git on both systems and used capistrano to deploy the app. However migrations fa

[Rails] Re: Set Time.zone from offset including DST

2009-09-23 Thread Florent
I'm not thinking I will write a timezone library yet ;) Currently I get the user offset from Javascript (I know about non js- enabled browsers), so I think about _maybe_ not using timezones at all, but just the offset for displaying purpose. This would be the last chance try. For now, I think I'

[Rails] Re: How to use remote_form_tag?

2009-09-23 Thread Patrick Doyle
Here is my best idea so far, which, unfortunately, doesn't work... <% form_remote_tag :url => "select_assembly", :update => "disposition", :html => {:id => 'xxx'} do %> <%= select_tag "use_part", options_for_select(@parts, @use_part), :onchange => "$('xxx').submit()" %> <% if @

[Rails] Re: Set Time.zone from offset including DST

2009-09-23 Thread Rob Biedenharn
On Sep 23, 2009, at 9:11 AM, Florent wrote: > On Sep 23, 2:00 pm, Rob Biedenharn > wrote: >> It can't be foolproof because the northern and southern hemispheres >> have opposite seasons and when they observe daylight time is >> understandably about a half-year off from the other hemisphere. I'm >

[Rails] How to use remote_form_tag?

2009-09-23 Thread Patrick Doyle
I have a partial that gets rendered in response to a #link_to_remote call. What I want to do is to display a select box, when the user selects an item from that box, display a second select box, when the user selects an item from that box, display a link (or possibly a submit button) allowing the

[Rails] Re: Set Time.zone from offset including DST

2009-09-23 Thread Colin Law
2009/9/23 Florent : > > > > On Sep 23, 2:00 pm, Rob Biedenharn > wrote: >> It can't be foolproof because the northern and southern hemispheres >> have opposite seasons and when they observe daylight time is >> understandably about a half-year off from the other hemisphere. I'm >> sure (even witho

[Rails] Re: rspec_scaffold URL generation errors

2009-09-23 Thread Steve Scruggs
Steve Scruggs wrote: The problem was caused by the plugin resource_fu. I removed the plugin and the url's are now generated as expected. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

[Rails] Re: Import excel / csv files

2009-09-23 Thread Marnen Laibow-Koser
Milan Dobrota wrote: > Why do you say that fixtures are broken? > The short answer is that they're unsuited to their intended purpose (populating the test DB). They're better than nothing, but are an inferior alternative to other solutions now available. I'll get into the long answer if you

[Rails] Re: Forcing a "wait"

2009-09-23 Thread Gianluca Tessarolo
@Frederick: could you give me a configuration example in which the sleep doesn't block the process ? (rails threadsafe mode...) I try with JRuby/Patched Mongrel/Glassfish gem but the result is evere the same: ex. 4 concurrent calls with sleep 10 each one I must wait 40 seconds ! The simple ex

[Rails] Re: Import excel / csv files

2009-09-23 Thread milandobrota
Why do you say that fixtures are broken? On Sep 22, 4:22 pm, Marnen Laibow-Koser wrote: > Goro Kuroita wrote: > > If you mean CSV to DB records, you should use fixtures. > > > On terminal window. > > rake db:fixtures:load FIXTURES=table_name RAILS_ENV=development > > > Change 'table_name' and RA

[Rails] Re: Set Time.zone from offset including DST

2009-09-23 Thread Florent
On Sep 23, 2:00 pm, Rob Biedenharn wrote: > It can't be foolproof because the northern and southern hemispheres   > have opposite seasons and when they observe daylight time is   > understandably about a half-year off from the other hemisphere. I'm   > sure (even without trying to check) that t

[Rails] Re: Collection_Select

2009-09-23 Thread John T.
Rails ROR wrote: > HI > > > Please explain me clearly so that i can proceed forward. > > Thanks in advance > *Sigh* http://www.lmgtfy.com/?q=rails+collection_select -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message be

[Rails] Re: activerecord get next element

2009-09-23 Thread Marnen Laibow-Koser
Mike Mickey wrote: > thanks colin and rob, that's approximately what I have so far, > I was hoping a solution to do it in one request :-/ > The simplest way would be to use UNION on the two queries. You could also use subquery syntax to munge the criteria. Best, -- Marnen Laibow-Koser http://

[Rails] Re: Forcing a "wait"

2009-09-23 Thread Frederick Cheung
On Sep 23, 1:27 pm, RVince wrote: > I have something in my controller which needs to wait 1 or 2 seconds > before doing a "render ..." well you could call sleep, but you will of course block that mongrel/ passenger instance etc. for the duration of the sleep (assuming rails in non threadsafe m

[Rails] Forcing a "wait"

2009-09-23 Thread RVince
I have something in my controller which needs to wait 1 or 2 seconds before doing a "render ..." Is there a means in Ruby where I can make things wait by x seconds or milliseconds before continuing processing a request? Thanks, RVince --~--~-~--~~~---~--~~ You rece

[Rails] Re: activerecord get next element

2009-09-23 Thread mickeyben
thanks colin and rob, that's approximately what I have so far, I was hoping a solution to do it in one request :-/ On Sep 23, 3:08 pm, Rob Biedenharn wrote: > On Sep 23, 2009, at 7:49 AM, mickeyben wrote: > > > > > > > On Sep 23, 2:38 pm, Colin Law wrote: > >> 2009/9/23 Bensoussan Michael : > >

[Rails] Re: Retrieving subject line from a mail

2009-09-23 Thread saideep a.v.s
I believe each mail object will be either hash or array, try finding out that and then you must be able to get the subject line from that object. Best Wishes, Saideep Annadatha On Wed, Sep 23, 2009 at 5:27 PM, Rails ROR wrote: > HI , > yeah i could do that. > > Thanks > Learner > > On Wed, Sep

  1   2   >