[Rails] Re: How to install Rails on CentOS 5.2

2009-07-08 Thread Brandon Joyce
Messed up my link. Here: http://blog.sonerdy.com/2009/01/setting-up-rails-on-godaddy-centos.html -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] Re: How to install Rails on CentOS 5.2

2009-07-08 Thread Brandon Joyce
I have a pretty good step by step on setting up rails on a GoDaddy CentOS server: http://blog.sonerdy.com/2009/01/setting-up-rails-on-godaddy-centos.html";>Setting up Rails on CentOS This uses passenger. Hope it helps! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~-

[Rails] Re: Upgrading from Rails 1.2.6

2009-07-08 Thread shusseina
Thanks for that! On Jul 9, 12:00 pm, HeChian wrote: > Your existing apps will not be upgraded after you upgrade your Rails > version. > You should upgrade them by hand. > > First, modify your config/environment.rb > # Modify following line > # RAILS_GEM_VERSION = '1.2.6' unless defined? RAILS_

[Rails] Rails/Ruby Style Guideline?

2009-07-08 Thread Hunt Jon
Hi, I'm trying to have a Ruby (and Rails) style guide for me and possibly for my team. I have found the following resources so far. * http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/ * http://www.pathf.com/blogs/ruby-and-rails-style-guide/ * http://github.com/chneukirchen/styleguide/

[Rails] Re: rerouting between controller's actions *WITHOUT REDIRECT_TO*

2009-07-08 Thread Maurício Linhares
Nops, procs can't be serialized, but you could (at your own risk) serialize a string with the code and then eval it. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed, Jul 8, 2009 at 11:37 PM, Jeffrey L. Taylor wrote: > > Quoting maurizio de magnis :

[Rails] Re: rerouting between controller's actions *WITHOUT REDIRECT_TO*

2009-07-08 Thread Jeffrey L. Taylor
Quoting maurizio de magnis : > > Hello everyone, I need to implement first level permalink style url > routing inside my rails application, ie: > /first_link.html > /another_one.html > ... > /last_one.html > > For each permalink there's an associated record (model: Permalink) so that: > permalin

[Rails] Re: Deployment on Dreamhost - Application Error

2009-07-08 Thread Tony Stricker
Pepe Junty wrote: > First off, deployment is not trivial so if you are an intern you should > be doing this under the supervision of a more experienced > developer/system adm. In other words, your boss made a mistake and > assigned you to the wrong position or is deliberately using you as cheap

[Rails] Re: Upgrading from Rails 1.2.6

2009-07-08 Thread HeChian
Your existing apps will not be upgraded after you upgrade your Rails version. You should upgrade them by hand. First, modify your config/environment.rb # Modify following line # RAILS_GEM_VERSION = '1.2.6' unless defined? RAILS_GEM_VERSION RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_V

[Rails] Upgrading from Rails 1.2.6

2009-07-08 Thread shusseina
I'm a Rails newbie. Currently my Mac is running Rails 1.2.6. I would like to know how to upgrade to Rails 2.0.2. How do I ensure my existing Rails apps are also upgraded? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[Rails] Re: Excessive use of CPU

2009-07-08 Thread Leandro Maioral
Hello Matt, thanks for the atention. I'm under Ruby 1.8.6 and Rails 2.3.2. The machine is a Macbook Pro with a Core 2 Duo 2.4GHz and 4GB of RAM. I have declared the nested conditions in the model as seen bellow. class Kit < ActiveRecord::Base has_many :kit_inclusions has_many :products, :th

[Rails] Re: Curious why copying an array element by element fails when using strip!

2009-07-08 Thread RichardOnRails
Hi Simon & Jamey, I forgot the first commandment of programming: RTFM. Sorry, guys. Thanks for you excellent responses. Best wishes, Richard On Jul 8, 8:11 pm, RichardOnRails wrote: > Hi, > > I wanted to copy one array into another, element by element, so that I > could edit the source data

[Rails] Re: Curious why copying an array element by element fails when using strip!

2009-07-08 Thread Jamey Cribbs
The strip! method isn't corrupting the copy. It's that the strip! method returns nil if nothing was stripped from the string. That's why you are getting nil for the second array element in the copy. Jamey On Wed, Jul 8, 2009 at 8:11 PM, RichardOnRails wrote: > > Hi, > > I wanted to copy one a

[Rails] Re: Curious why copying an array element by element fails when using strip!

2009-07-08 Thread Simon Macneall
Hi, Did you read the documentation on strip and strip!? (http://ruby-doc.org/core/classes/String.html#M000820) strip! modifies the existing string (returning itself if a modification occurred and nil if nothing was done), while strip does the modification and returns a new string. Simon

[Rails] Curious why copying an array element by element fails when using strip!

2009-07-08 Thread RichardOnRails
Hi, I wanted to copy one array into another, element by element, so that I could edit the source data as necessary. I simultaneously changed a source element using "strip!". The latter step corrupted the copying. Without the bang operator, all works as expected. The above question, source co

[Rails] Re: Different version of RoR on server

2009-07-08 Thread Rick DeNatale
On Wed, Jul 8, 2009 at 5:25 PM, Colin Law wrote: > > 2009/7/8 Pål Bergström : >> >> I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on >> my side based on 2.1.1? If yes, how do I do that? >> -- >> > > The best plan would be to get the server updated if possible. Another opti

[Rails] Re: Problems running rake test (possibly gem/debian issues)

2009-07-08 Thread Keith Salisbury
Matt Jones wrote: > Given that the error states that Clearance::Test is missing, I'd say a > Clearance issue is quite likely... > > --Matt Jones > > On Jul 7, 5:58�pm, Keith Salisbury > wrote: >> "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" >> (NameError) > [snip] Than

[Rails] Re: Different version of RoR on server

2009-07-08 Thread Eric
On Jul 8, 3:24 pm, Pål Bergström wrote: > Eric wrote: > > On Jul 8, 2:15 pm, P l Bergstr m > > wrote: > >> I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on > >> my side based on 2.1.1? If yes, how do I do that? > > > The long way would be to install 2.1.1 via "gem install

[Rails] Re: Different version of RoR on server

2009-07-08 Thread Pål Bergström
Eric wrote: > On Jul 8, 2:15�pm, P�l Bergstr�m > wrote: >> I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on >> my side based on 2.1.1? If yes, how do I do that? > > The long way would be to install 2.1.1 via "gem install rails -v > 2.1.1" and change the Rails version for

[Rails] Re: Different version of RoR on server

2009-07-08 Thread Eric
On Jul 8, 2:15 pm, Pål Bergström wrote: > I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on > my side based on 2.1.1? If yes, how do I do that? The long way would be to install 2.1.1 via "gem install rails -v 2.1.1" and change the Rails version for the app in config/ envir

[Rails] Re: Different version of RoR on server

2009-07-08 Thread Colin Law
2009/7/8 Pål Bergström : > > I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on > my side based on 2.1.1? If yes, how do I do that? > -- > The best plan would be to get the server updated if possible. Colin --~--~-~--~~~---~--~~ You received

[Rails] Different version of RoR on server

2009-07-08 Thread Pål Bergström
I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on my side based on 2.1.1? If yes, how do I do that? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ru

[Rails] date as textfield, virtual attribute can't be empty?

2009-07-08 Thread Herman Müller
Hi Ruby comunity! I made a virtual date attribute to input date into a textfield. Here is my entry from models\tbl_data.rb: def date_test_string date_test.strftime('%d.%m.%Y') end def date_test_string=(date_test_str) self.date_test = Date.strptime(date_test_str, '%d.%m.%Y') rescu

[Rails] SOLUTION: ActiveRecord HABTM finds with "AND"

2009-07-08 Thread Kevin Elliott
Thanks to the guidance of an answer submitted by LucaM on the StackOverflow post, I was able to come up with a SQL query and ActiveRecord find query that does it. SQL: SELECT c.park_id, a.name FROM parks a, features b, features_parks c WHERE (c.park_id = a.id) AND (c.feature_id = b.id) AND

[Rails] Re: running a unit test over and over in script/console

2009-07-08 Thread Andrew Arrow
Marnen Laibow-Koser wrote: > If you're going to do that, then it's probably better to declare a > function that will do all that so you don't have to rely on the up-arrow > key. But why not just use autotest? Sure, I can make it easier with a function, that was just the first version I got wo

[Rails] Re: ActiveRecord HABTM finds with "AND"

2009-07-08 Thread Kevin Elliott
To further show an example of trying to do this, here is a 'real world' example. However, in this particular case, I'm only showing two features, but in real usage, a user might select as many as 50 features or so. mysql> SELECT c.park_id, a.name, c.feature_id, b.name FROM parks a, feature

[Rails] Re: programmatically add a route

2009-07-08 Thread mike
You can add a static file system path to your render call with the :file option 2009/7/8, Gavin Morrice : > > Now that I think about it - don't think this would work > > render looks through the view folders for your partial - not sure if > you'd be able to store them in the public directory > >

[Rails] Re: transaction is not working in mysql database

2009-07-08 Thread mike
Your first code does not raise an exception and so the transaction is not rolled back. Note the exclamation mark after create! 2009/7/8, Sniper Abandon : > > Ruby/Rails/DB/PF -v => 1.8.6/2.3.2/mysql/Winxp > >>user.rb > class User > validates_presence_of :name > end > > > > # code 1 > def destroy

[Rails] Re: running a unit test over and over in script/console

2009-07-08 Thread Marnen Laibow-Koser
Andrew Arrow wrote: > I started doing this: > > $ RAILS_ENV=test script/console > >>> load 'test/unit/models/example_test.rb'; r = Test::Unit::TestResult.new; >>> reload!; ExampleTest.new(:test_example1).run(r) { |c,v| }; pp results > > and then just hit up arrow and run that same line again o

[Rails] Re: Search within Search Result set

2009-07-08 Thread Arzumy
I'm looking for way to do this too actually. Except that I don't have actual need for it yet :) I guess if you are using something like thinking sphinx, you could just append current search keywords with new search keywords and do another sphinx search. Just a thought. Cheers! Arzumy On Jul 8,

[Rails] Re: Button that doesn't submit

2009-07-08 Thread Philip Hallstrom
On Jul 8, 2009, at 11:49 AM, JannaB wrote: > > Yes, I tried that: > > <%= button_to "Manual Up", :action => "manup" %> > > Then, in my controller I have it either rendering nothing or a > partial. But it renders a blank page even though the partial is > embedded deep within divs of another parti

[Rails] Re: question on railfrog

2009-07-08 Thread Matt Jones
Most likely because it is an Engine plugin, and the API for those changed significantly in Rails 2.1 (I seem to recall). It looks like the project had sat dormant for all of 2008 and most of this year, so they have a *lot* of updating to do. --Matt Jones On Jul 7, 9:35 am, taiwo obafrmi wrote:

[Rails] running a unit test over and over in script/console

2009-07-08 Thread Andrew Arrow
I started doing this: $ RAILS_ENV=test script/console >> load 'test/unit/models/example_test.rb'; r = Test::Unit::TestResult.new; >> reload!; ExampleTest.new(:test_example1).run(r) { |c,v| }; pp results and then just hit up arrow and run that same line again over and over in script/console. T

[Rails] Re: Using the model to insert records without a running rails application

2009-07-08 Thread Matt Jones
ar_fixtures can do some of this kind of stuff - may be worth taking a look at. --Matt Jones On Jul 6, 11:54 am, "David A. Black" wrote: > Hi -- > > On Mon, 6 Jul 2009, ms wrote: > > > Hey, > > > I want to insert new records manually with a little ruby script and I > > want to use the correspond

[Rails] Re: Excessive use of CPU

2009-07-08 Thread Matt Jones
Can you give more information on your environment? It shouldn't be taking that long... I'd also advise you to read more documentation; some parts of your code are working against the Rails default conventions (for instance: the action that creates records is typically 'create', not 'new_do'). It'

[Rails] Re: ActiveRecord HABTM finds with "AND"

2009-07-08 Thread Kevin Elliott
On Jul 8, 2009, at 11:24 AM, Matt Jones wrote: > > I'm not sure that doing it in SQL is always going to be faster - > there's got to be some performance penalty for doing a join with the > same table that many times. > > One favorite trick that can sometimes make things like this more > efficien

[Rails] Re: Senior Ror,Mysql

2009-07-08 Thread Matt Harrison
eric cs wrote: > We are looking for experienced Ruby on Rails, Mysql, Ajax, Padrones de > diseno,uml,CSS desarrollador de un proyecto completo. > > El proyecto se llevaría a cabo a través de Internet, 8-9 horas al día > durante un mes por lo menos. > Por favor envíe su CV y aspiraciones salariale

[Rails] Re: Button that doesn't submit

2009-07-08 Thread JannaB
Yes, I tried that: <%= button_to "Manual Up", :action => "manup" %> Then, in my controller I have it either rendering nothing or a partial. But it renders a blank page even though the partial is embedded deep within divs of another partial. So whether I tell it to render nothing, or just the dee

[Rails] Re: Storing Images in Database or File System?

2009-07-08 Thread Arzumy
May I add that by storing your images in on filesystem within public will allow any request to bypass your app server and serve directly by web server. And less database hit, means faster response time :) Strongly suggest don't store in database, if later on you want to manipulate the images usin

[Rails] Re: Button that doesn't submit

2009-07-08 Thread Philip Hallstrom
On Jul 8, 2009, at 11:40 AM, JannaB wrote: > > Is there a way to put a button on a view that doesn;t do a "submit" > but executes a method in the controller? -Janna Look at the button_to methods... although by default they create a form to your action and submit it you can control the method

[Rails] Button that doesn't submit

2009-07-08 Thread JannaB
Is there a way to put a button on a view that doesn;t do a "submit" but executes a method in the controller? -Janna --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, s

[Rails] Re: link_to, how do you combine url options and html_options?

2009-07-08 Thread Matt Jones
I think what was confusing you was the difference between url_options and html_options. They are not named in the most descriptive format, but the source is much clearer. The only things that end up in url_options are things that you can pass to url_for: so neither :method nor :confirm belong ther

[Rails] Re: Rails apps. with Microsoft Access as a back end?

2009-07-08 Thread Wes Gamble
Roy Pardee wrote: > Never tried it. I think the lack of an adapter is what kills this. I'd > be curious to hear whether the sqlserver adapter in ODBC mode could be > fooled into hitting msaccess w/the right connect string... Good point. Might be that the connect string setup would have to be

[Rails] Re: Problems running rake test (possibly gem/debian issues)

2009-07-08 Thread Matt Jones
Given that the error states that Clearance::Test is missing, I'd say a Clearance issue is quite likely... --Matt Jones On Jul 7, 5:58 pm, Keith Salisbury wrote: > John Barnette wrote: > > I'd try relaxing your gem requirement (above), or manually installing > > cucumber 0.3.0, e.g., > > Thanks

[Rails] Re: ActiveRecord HABTM finds with "AND"

2009-07-08 Thread Matt Jones
I'm not sure that doing it in SQL is always going to be faster - there's got to be some performance penalty for doing a join with the same table that many times. One favorite trick that can sometimes make things like this more efficient is to specifically request only the ids of the relevant obje

[Rails] Re: Rails apps. with Microsoft Access as a back end?

2009-07-08 Thread Pardee, Roy
Never tried it. I think the lack of an adapter is what kills this. I'd be curious to hear whether the sqlserver adapter in ODBC mode could be fooled into hitting msaccess w/the right connect string... -Original Message- From: rubyonrails-talk@googlegroups.com [mailto:rubyonrails-t...

[Rails] Re: Upgrading on Unix

2009-07-08 Thread Brian Penrose
hi there wrote: > If your new version ruby overwrites the old one, you needn't re-install > gems. > > On Tue, Jul 7, 2009 at 9:13 PM, Brian Penrose < Thanks all...I was able to move on w/out re-installing the gems. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~

[Rails] calling content_for from a controller

2009-07-08 Thread Josh
i've got a helper method that calls content_for to get all of the content for a sidebar. it's kind of annoying though because i'm having to go into each template file and add <% render_sidebar %> it'd be great if i could add some before filter in the controller and specify what actions i want the

[Rails] Re: Deployment on Dreamhost - Application Error

2009-07-08 Thread Matt Jones
If you've got ssh access, try calling dispatch.fcgi directly from the command line. That will show you whatever error message is coming up. --Matt Jones On Jul 8, 2:07 am, Tony Stricker wrote: > Hi, i'm a newb, just taught myself ruby/rails in the past 2 months and > have been having headache a

[Rails] accepts_nested_attributes_for and has_one

2009-07-08 Thread Jack H
Hi all, I'm seeing some unexpected behaviour in a nested model and I'm not sure if it's a bug or if I'm doing something wrong. When assigning nested attributes, the associated object gets replaced with a new record. Example code: class Car < ActiveRecord::Base belongs_to :driver end class Ca

[Rails] Re: Rails apps. with Microsoft Access as a back end?

2009-07-08 Thread bill walton
Hi Wes, On Wed, 2009-07-08 at 18:13 +0200, Wes Gamble wrote: > I'm not interested in hearing questions about why someone would want to > do such a silly thing ;). Understood. Just wanted to send my sympathies ;-) Best regards, Bill --~--~-~--~~~---~--~~ You re

[Rails] Re: How to Trigger 'onclick' or 'onchange' on

2009-07-08 Thread Vikas Gholap
Rails List wrote: > I have two dropdowns 'a' and 'b'. when something is selected on 'a', > its onchange event has an action and an update area which works fine. > > but when it comes to editing a record, i am able to list items in 'a' > dropdown and select the current value but this leave 'b' dr

[Rails] Rails apps. with Microsoft Access as a back end?

2009-07-08 Thread Wes Gamble
Curious as to whether anyone out there has set up Rails as a front end to a M$ Access DB? I have done it with SQL Server, and have used ODBC to do it, so I know that this is certainly possible. I'm interested in gotchas, and good advice. I'm not interested in hearing questions about why someone

[Rails] Re: 'ruby script/server' fails. 'No such file to load' Not sure what the issue is.

2009-07-08 Thread Christopher Warren
Looks like openssl isn't set up correctly. "no such file to load -- openssl" I haven't used CentOS, but this blog post might help: http://www.odindev.com/ruby-errors-centos-52 "I used yum and downloaded the openssl-devel package and dependancies but still was getting the error. To fix, you have

[Rails] Re: Storing Images in Database or File System?

2009-07-08 Thread Roderick van Domburg
Exactly what does "large image content" mean? Are they large images, or will you have a large amount of images? Is the typical workload characterized by read operations or write operations? Do some of the images require access authorization? Reading from the filesystem is faster than from the

[Rails] Re: A lot of postgresql database users authenticating and co

2009-07-08 Thread Roderick van Domburg
Alfredo Rico Moros wrote: > There are a lot of database users which belongs to different kind of > databases roles according to their responsibilities, and when a new > user is incorporated from the web application, actually that new user > is added to the database system users (I meant, there isn

[Rails] Re: ActiveSupport::TestCase does not respond to "get" or "post"

2009-07-08 Thread Frederick Cheung
On Jul 8, 4:28 pm, Beta wrote: > The import_fixtures fails, and I've read that the new way to do this > is with ActiveSupport::TestCase. But if I change > Test::Unit::TestCase by ActiveSupport::TestCase, I get the error > > NoMethodError: undefined method `get' for # 0xb7cbd560> > > What can it

[Rails] ActiveSupport::TestCase does not respond to "get" or "post"

2009-07-08 Thread Beta
Hi everybody, I'm upgrading an app from rails 1.2.3 to rails 2.3.2. I've a problem with the controllers tests. At the beginning, a test was defined as class XControllerTest < Test::Unit::TestCase import_fixtures :fix1, :fix2, ... def test_something get :something, {:some => 'Params'

[Rails] Re: rerouting between controller's actions *WITHOUT REDIRECT_TO*

2009-07-08 Thread Maurício Linhares
Well, that's isn't something easy to get going :) What you need to do is remove this "permalink" controller and implement the urls using permalinks for each model/controller pair that requires them. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed,

[Rails] Complex relations

2009-07-08 Thread Marek Jelen
Hi, I wanted to ask, whether someone could help me. I have in my project quite a lot of complex relations between my models. For example: has_many :some_groups, :class_name => 'Group', :finder_sql => ' SELECT DISTINCT groups.* FROM groups JOIN memberships ON memberships.group_id=groups.i

[Rails] rerouting between controller's actions *WITHOUT REDIRECT_TO*

2009-07-08 Thread maurizio de magnis
Hello everyone, I need to implement first level permalink style url routing inside my rails application, ie: /first_link.html /another_one.html ... /last_one.html For each permalink there's an associated record (model: Permalink) so that: permalink = Permalink.find_by_url("first_link.html") # the

[Rails] 'ruby script/server' fails. 'No such file to load' Not sure what the issue is.

2009-07-08 Thread j
I installed Ruby, RubyGems and Rails with no problems. When I issue the 'ruby script/server' command it gives me the following output and fails. Can someone tell me what might be my problem? My distro is CentOS 5.3 just in case that helps any. ruby script/server => Booting WEBrick => Rails 2.3.2

[Rails] Determining which tables are available (oracle)

2009-07-08 Thread mrodgers
I am trying to connect to an oracle database using the OCI8 tools and everything appears to be working fine (rake db:migrate pulls no errors). The only issue is, I'm not sure how to determine which tables are available. I know the table names for running queries, but they do not appear in the loca

[Rails] Storing Images in Database or File System?

2009-07-08 Thread SS
Hello, I'm new to providing image content online and I need to take the right approach early in my development to avoid any significant performance or storage hits later on. I'm using Ruby on Rails to provide large image content on my website. However, I'm not sure if I should store images on serv

[Rails] Excessive use of CPU

2009-07-08 Thread Leandro Maioral
Hello guys and girls, I have a problem with a method (new), it is using 100% of CPU for 15/20 seconds. Follow the method below: http://pastie.org/537568 ## kits_controller.rb def new @page_title = 'Add a Kit' @kit = Kit.new @num_itens = 16 @kit_inclusions = Array.new @num_itens.times

[Rails] Setting up routes with formats and parameters that are domain names

2009-07-08 Thread Dan Van Derveer
## Configuration This is on Rails 2.3.2.1 running on ruby 1.8.4 ## in config/routes.rb map.somecontroller_show 'somecontroller/:id.:format', :requirements => {:id => /\w[^\/?;]*/ }, :controller => 'somecontroller', :action => 'show', :conditions => { :method => :get } ## the problem :id fo

[Rails] Senior Ror,Mysql

2009-07-08 Thread eric cs
We are looking for experienced Ruby on Rails, Mysql, Ajax, Padrones de diseno,uml,CSS desarrollador de un proyecto completo. El proyecto se llevaría a cabo a través de Internet, 8-9 horas al día durante un mes por lo menos. Por favor envíe su CV y aspiraciones salariales. projetoec...@hotmail.com

[Rails] Re: Upgrading on Unix

2009-07-08 Thread stainless
If your new version ruby overwrites the old one, you needn't re-install gems. On Tue, Jul 7, 2009 at 9:13 PM, Brian Penrose < rails-mailing-l...@andreas-s.net> wrote: > > Do I need to re-install gems after upgrading from Ruby 1.8.6 to 1.8.7 on > Unix? > -- > Posted via http://www.ruby-forum.com/.

[Rails] Re: Upgrading on Unix

2009-07-08 Thread kilari
Brian, Yup you need to re install rubygems n all the gems. Thanks, Kilari. http://kilari.co.in On Jul 7, 6:13 pm, Brian Penrose wrote: > Do I need to re-install gems after upgrading from Ruby 1.8.6 to 1.8.7 on > Unix? > -- > Posted viahttp://www.ruby-forum.com/. --~--~-~--~~

[Rails] question on railfrog

2009-07-08 Thread taiwo obafrmi
i would like to know why railfrog is not working on any platform higher than rails 2.0.5 --~--~-~--~~~---~--~~ 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-ta

[Rails] Ruby on Rails opportunity in the online gaming industry

2009-07-08 Thread StuartF
Are you a web developer specializing in Ruby on Rails, looking for a new challenge in the online gaming industry? This company is looking for a focused, talented and career-driven Web Developer who wants to join an organisation where there are copious new and ongoing projects. The role has occurr

[Rails] A lot of postgresql database users authenticating and connecting from an enterprise rails application

2009-07-08 Thread Alfredo Rico Moros
Hi to everybody, my name is Alfredo Rico from Venezuela. Please apologize if my english is not so good... My company is beginning a huge enterprise rails project for a goverment customer. We have setting up a postgresql database following a number of considerations that make it a fortress, imple

[Rails] Re: programmatically add a route

2009-07-08 Thread Gavin Morrice
Now that I think about it - don't think this would work render looks through the view folders for your partial - not sure if you'd be able to store them in the public directory :S Gavi http://handyrailstips.com -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~-

[Rails] transaction is not working in mysql database

2009-07-08 Thread Sniper Abandon
Ruby/Rails/DB/PF -v => 1.8.6/2.3.2/mysql/Winxp >user.rb class User validates_presence_of :name end # code 1 def destroy User.count #=> 0 User.transaction do User.create({:name=>"kkk"}) User.create({:name=>nil}) end User.count #=> 1 end # why it is stored one record only even it is i

[Rails] Re: Deployment on Dreamhost - Application Error

2009-07-08 Thread Pepe Junty
First off, deployment is not trivial so if you are an intern you should be doing this under the supervision of a more experienced developer/system adm. In other words, your boss made a mistake and assigned you to the wrong position or is deliberately using you as cheap workforce (which happens

[Rails] Re: How to Trigger 'onclick' or 'onchange' on

2009-07-08 Thread JannaB
This is easily a dhtml issue, or one that can likely be performed in rjs. (repopulating 'b') when someting occurs. Additionally, here is working code I use to pick up when a dropdown's selection has changed: <% form_for :channels, :html => {:name => 'channelsform'},:url=> { :action =>"newchannel"

[Rails] Re: programmatically add a route

2009-07-08 Thread Gavin Morrice
Janna Brossard wrote: > Well, for example. I was going to have it write partials into /public/ > blahblah/_mypartial!.erb map.connect "/blahblah/:partial_name", :controller => "yourcontroller", :action => "your_action" This would work provided you're always routing to the same controller and a

[Rails] Re: programmatically add a route

2009-07-08 Thread JannaB
Well, for example. I was going to have it write partials into /public/ blahblah/_mypartial!.erb --~--~-~--~~~---~--~~ 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 rubyonr

[Rails] Editable Combobox

2009-07-08 Thread JannaB
I am in dire need of something like an editable combox - though, it doesn;t have to subscribe to the combo box idiom - perhaps some of the ajax-like features / dhtml can provide what I need. What do people in the RoR world do when they need this kind of functionality? Thanks, Janna B. --~--~--

[Rails] Re: programmatically add a route

2009-07-08 Thread James Englert
I'm not sure but it seems possible to have a route at the end of your routes file (with the lowest priority) that would handle any un-handled requests. You could then dispatch it to wherever you want. Maybe there is a better way to do it though. Could you give some example URL's? On Wed, Jul 8,

[Rails] Re: link_to, how do you combine url options and html_options?

2009-07-08 Thread James Byrne
Älphä Blüë wrote: > <%= link_to('Your Link', your_controller_path, :confirm => 'Are you > sure?', :method => :post, :id => "css_id", :class => "css_class") %> Thank you to all who replied. I am on Rails 2.3.2 and yes, the code above does work for me as well. I cannot gather from the API docum

[Rails] Re: Problems running rake test (possibly gem/debian issues)

2009-07-08 Thread Keith Salisbury
Bumpety bump.does anyone have any ideas about this? please? thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, s

[Rails] mysql gem error on solaris 10 sparc

2009-07-08 Thread Manish Arya
r...@xxx:/opt/gitorious/config# gem install mysql Building native extensions. This could take a while... Successfully installed mysql-2.7 1 gem installed Installing ri documentation for mysql-2.7... Installing RDoc documentation for mysql-2.7... r...@xxx:/opt/gitorious/config# rake db:create:al

[Rails] Rails Connection Pool With Firewall

2009-07-08 Thread AD
Does anyone know how to properly configure rails connection pool to behave through a firewall? We are seeing a lot of timeout errors with activerecord (webapp has firewall between it and the firewall) and not sure how to enable connection pool settings similar to DBCP with tomcat. Thanks AD --~

[Rails] Re: ActiveRecord HABTM finds with "AND"

2009-07-08 Thread Rick DeNatale
On Wed, Jul 8, 2009 at 1:21 AM, Sijo Kg wrote: > > Hi > >  arr = [] >  Feature.find(:all,:conditions => ['name in (?,?,?,?,?,?)','Wheelchair > Access','Playground','Sandbark','Library','Computer Lab','Testing > Center']).each {|f| arr = arr && f.schools} > >  Now arr have the required value.Is tha

[Rails] Re: ERB templates in the database

2009-07-08 Thread Kris Leech
I've been looking in to rendering safe templates recently. There are a few options I have been exploring... 1.) JRuby Sandbox - There is a recent video presentation knocking about that is worth checking (I couldn't find it via Google) 2.) Safemode http://github.com/svenfuchs/safemode/tree/mast

[Rails] Search within Search Result set

2009-07-08 Thread Rails List
I looking into a search functionality to provide a "search within results" option. Not sure how to go about it. Any ideas? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[Rails] Re: Tricky find on associated conditions

2009-07-08 Thread Gavin Morrice
Sweet - wasn't aware of that one Thanks :) Gavin http://handyrailstips.com -- 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: Tricky find on associated conditions

2009-07-08 Thread Carsten Gehling
Gavin Morrice wrote: > > Off the top of my head, try: > > Category.all :include => :articles, :order => "articles.published_on > DESC" Works like a charm - thanks! Now that you got my head pointed in the right direction ;-) I noticed, that :joins does the same job for me (ie. same result) w

[Rails] [ANN] a helper to DRY-up internationalized 's (http://github.com/lwe/page_title_helper)

2009-07-08 Thread lwe
Hey there Code and (longer) quick-start guide can also be found here: http://github.com/lwe/page_title_helper To customize page titles there are many different methods, among the most popular (and best looking) is certainly: http://railscasts.com/episodes/30-pretty-page-title, even more there ar

[Rails] Re: programmatically add a route

2009-07-08 Thread Gavin Morrice
Janna Brossard wrote: > Is there a way to programmartically add a route? I have an outside > process creating pages that I need to access, but I dont know their > names or locations until runtime. -Janna B Janna, Sounds messy! Are you sure this is the best option? What is it you're trying to ac

[Rails] Re: Tricky find on associated conditions

2009-07-08 Thread Gavin Morrice
Carsten Gehling wrote: > My head is spinning a bit this morning - can somebody help me with this? > > Given these two models with the following associations: > > class Article < ActiveRecord::Base > belongs_to :category > > - has an attribute called "published_on" > end > > class Category

[Rails] Re: How to use different key than :id in route?

2009-07-08 Thread mike
You can overwrite to_param to return the random thing and use find_by_random_thing params[:id] in your controller actions 2009/7/8, mike : > 2009/7/7, Rails List : >> >> Ben Wilson wrote: >>> Okay, so I'm trying to have a URL like the following (which uses a key >>> generated at random): >>> >>>

[Rails] Re: How to use different key than :id in route?

2009-07-08 Thread mike
2009/7/7, Rails List : > > Ben Wilson wrote: >> Okay, so I'm trying to have a URL like the following (which uses a key >> generated at random): >> >> societies/6b241c631c6beaa89c889b9fb388caef9f617900ca1eff >> societies/6b241c631c6beaa89c889b9fb388caef9f617900ca1eff/edit >> >> Where do I change th

[Rails] Re: multiple associated records

2009-07-08 Thread mike
I think the has one assoc. Is a good idea. But use :class_name => 'Price' instead of :through and :source 2009/7/6, Craig White : > > On Mon, 2009-07-06 at 11:16 -0700, Craig White wrote: >> I am dealing with a legacy db which is limiting my options here. >> >> I have... >> >> class Stockmaster <