[Rails] rspec-2.6.0.rc2 is released!

2011-04-18 Thread David Chelimsky
We're releasing rspec-2.6.0.rc2 as a release candidate as there are some internal changes that we'd like to see put through their paces before doing a final release. Note that the changes I speak of are internal. There are no new deprecations in this release, nor any backward-incompatible

[Rails] rubygems fail - require hpricot!

2011-04-18 Thread Anush J.
Hi guys, I wanted to fetch some info from webpage and use it in my db. I read hpricot is one way to do it. But the problem is I'm unable to use it with my app. For some reason after successfully installing hpricot it fails when I try to use it in the rails console. I've been trying to fix this

[Rails] Re: what is mean of Deployment?

2011-04-18 Thread Mohamed Aslam
All most all developers develop application in their local computer. This is called as development environment. Once your development completed, you need to move the application to a production server where other people can use your website. Moving the application from development environment to

[Rails] Re: what is mean of Deployment?

2011-04-18 Thread amrit pal pathak
On Apr 18, 11:48 am, Mohamed Aslam aslamnaj...@gmail.com wrote: All most all developers develop application in their local computer. This is called as development environment. Once your development completed, you need to move the application to a production server where other people can use

[Rails] Re: what is mean of Deployment?

2011-04-18 Thread amrit pal pathak
On Apr 17, 9:02 pm, Peter De Berdt peter.de.be...@pandora.be wrote: On 17 Apr 2011, at 17:04, amrit pal pathak wrote: On Apr 17, 7:27 am, Chris Kottom ch...@chriskottom.com wrote: Are you planning to continue using sqlite in the production   environment?  Most people don't, but it's

[Rails] unable to set default_url_options on per environment basis

2011-04-18 Thread charles d
Im trying to set the default_url_options on a per environment basis but nothing is working. I keep getting Missing host to link to! Please provide :host parameter or set default_url_options[:host] post.rb def share_all url = Rails.application.routes.url_helpers.post_url(self) if

[Rails] Re: rubygems fail - require hpricot!

2011-04-18 Thread Frederick Cheung
On Apr 18, 7:12 am, Anush J. li...@ruby-forum.com wrote: Hi guys, I wanted to fetch some info from webpage and use it in my db. I read hpricot is one way to do it. But the problem is I'm unable to use it with my app. For some reason after successfully installing hpricot it fails when I try

Re: [Rails] Re: what is mean of Deployment?

2011-04-18 Thread Colin Law
On 18 April 2011 08:23, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 17, 9:02 pm, Peter De Berdt peter.de.be...@pandora.be wrote: On 17 Apr 2011, at 17:04, amrit pal pathak wrote: On Apr 17, 7:27 am, Chris Kottom ch...@chriskottom.com wrote: Are you planning to continue

[Rails] query optimize

2011-04-18 Thread jey bal
I have following query for find out the total no of counts. *** SELECT count(*) FROM contacts_lists JOIN plain_contacts ON contacts_lists.contact_id = plain_contacts.contact_id JOIN

[Rails] Re: Rails 3 Migration expecting test gems to be installed??

2011-04-18 Thread johnnybutler7
thanks, my gem file is: source 'http://rubygems.org' gem 'rails', '3.0.3' gem 'omniauth' gem 'pg', :require = 'pg' gem 'devise' gem 'cancan' gem 'haml' gem 'hpricot' gem 'ruby_parser' gem 'rails_admin', :git = 'git://github.com/sferik/rails_admin.git' gem 'acts-as-taggable-on' gem

[Rails] Re: what is mean of Deployment?

2011-04-18 Thread amrit pal pathak
On Apr 18, 3:56 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011 08:23, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 17, 9:02 pm, Peter De Berdt peter.de.be...@pandora.be wrote: On 17 Apr 2011, at 17:04, amrit pal pathak wrote: On Apr 17, 7:27 am,

[Rails] Could use some opinions on indexes

2011-04-18 Thread Phoenix Rising
Hey guys, Finding a more experienced group of developers is a tough challenge, so I'm posting this here. It's slightly Rails-related, but mostly a database issue. So I'm using AuthLogic for an app I'm building. Should I be worried about putting indexes on fields like crypted_password,

[Rails] Re: Rails 3 Migration expecting test gems to be installed??

2011-04-18 Thread Phoenix Rising
I wish I had a hard-and-fast answer for you Johnny, but one question that comes to mind: is the staging environment somehow inheriting settings from your test environment? On Apr 18, 2:49 am, johnnybutler7 johnnybutl...@gmail.com wrote: thanks, my gem file is: source 'http://rubygems.org'

[Rails] how to handle session with external input?

2011-04-18 Thread frankblizzard
Hi, I hope I chose the right title for the question. I am doing a time tracking app for our intranet. Because the people tend to forget to save their hours, we made a small desktop app with adobe air that pops up where you can enter your hours, the hours should be posted to the hours controller

[Rails] How to change the url (from localhostL:3000) to (example.com)

2011-04-18 Thread amrit pal pathak
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at example.com in brower when i start the serve normally as script/ server . What to do? Thanks -- You received this message because you are subscribed to the Google

[Rails] How to change the url (from localhostL:3000) to (example.com)

2011-04-18 Thread amrit pal pathak
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at example.com in brower when i start the serve normally as script/ server . What to do? Thanks -- You received this message because you are subscribed to the Google

[Rails] How to generate a form in rails 2.3.5

2011-04-18 Thread amrit pal pathak
I am new to ROR and running 2.3.5.I want a simple form with some text boxes,password field,check box etc. How to generate a form in ROR? Thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] How to generate a form in rails 2.3.5

2011-04-18 Thread amrit pal pathak
I am new to ROR and running 2.3.5.I want a simple form with some text boxes,password field,check box etc. How to generate a form in ROR? Thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

Re: [Rails] How to generate a form in rails 2.3.5

2011-04-18 Thread Chris Kottom
Have you read http://guides.rubyonrails.org/v2.3.8/form_helpers.html? On Mon, Apr 18, 2011 at 11:55 AM, amrit pal pathak amritpalpath...@gmail.com wrote: I am new to ROR and running 2.3.5.I want a simple form with some text boxes,password field,check box etc. How to generate a form in ROR?

[Rails] Re: Problem with new action 'validate'

2011-04-18 Thread Frederick Cheung
On Apr 17, 9:12 pm, Jose tomas R. li...@ruby-forum.com wrote: I've created a new action in my invitations controller named validate and validation controller/invitations_controller.rb def validate end def validation   @invitation = Invitation.find(params(:key)) shouldn't that be

[Rails] how to update data

2011-04-18 Thread News Aanad
hi, I have json string in json request. i want to update the database using that string. how can i do that? There would be a multipal object in this string. sample string is:

[Rails] How to change the url (from localhostL:3000) to (example.com)

2011-04-18 Thread amrit pal pathak
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at example.com in brower when i start the serve normally as script/ server . What to do? Thanks -- You received this message because you are subscribed to the Google

[Rails] Unable to install Rails through proxy

2011-04-18 Thread rubynewbie
I am new to Rails and have been facing difficulty while installing rails. I have already installed Ruby and RubyGems on my machine by downloading the packages. But when I install Rails through RubyGems through a HTTP Proxy , I am thrown an error. Below is the details of the command and the

[Rails] Re: Rails 3 Migration expecting test gems to be installed??

2011-04-18 Thread Frederick Cheung
On Apr 15, 2:01 pm, johnnybutler7 johnnybutl...@gmail.com wrote: Hi, I have gem file set up so only the specific gems are installed/needed for each environment, so all the test gems like cucumber etc are grou[ed in test.  When i try a rake db:migrate RAILS_ENV=staging on the staging server

[Rails] whyt should i use mongrel_cluster ?

2011-04-18 Thread amrit pal pathak
why should i use mongrel_cluster in my rails application? What are its benefits for which i should install and configure it ? is webrick server not enough for rails application? Thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

[Rails] whyt should i use mongrel_cluster ?

2011-04-18 Thread amrit pal pathak
why should i use mongrel_cluster in my rails application? What are its benefits for which i should install and configure it ? is webrick server not enough for rails application? Thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

[Rails] Re: Could use some opinions on indexes

2011-04-18 Thread Frederick Cheung
On Apr 18, 10:32 am, Phoenix Rising polarisris...@gmail.com wrote: Hey guys, Finding a more experienced group of developers is a tough challenge, so I'm posting this here.  It's slightly Rails-related, but mostly a database issue. So I'm using AuthLogic for an app I'm building.  Should I

[Rails] Re: query optimize

2011-04-18 Thread Frederick Cheung
On Apr 18, 9:49 am, jey bal li...@ruby-forum.com wrote: I have following query for find out the total no of counts. ***       SELECT count(*)       FROM contacts_lists       JOIN plain_contacts ON

[Rails] Re: Rails 3 Migration expecting test gems to be installed??

2011-04-18 Thread johnnybutler7
Yes i did bundle install --without test and that worked fine, when i try the db migrate for staging i get the error, i could install all the gems as you say rspec is needed for other stuff possibly but the actual error for the autotest gem is because its specific to mac, the staging site is on

[Rails] Re: How to generate a form in rails 2.3.5

2011-04-18 Thread amrit pal pathak
On Apr 18, 6:05 am, Chris Kottom ch...@chriskottom.com wrote: Have you readhttp://guides.rubyonrails.org/v2.3.8/form_helpers.html? i read a bit .like it tell about to write a simple code like form action=/home/index method=post div style=margin:0;padding:0 input

Re: [Rails] How to change the url (from localhostL:3000) to (example.com)

2011-04-18 Thread Peter De Berdt
On 18 Apr 2011, at 11:51, amrit pal pathak wrote: I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at example.com in brower when i start the serve normally as script/ server . What to do? 1. Learn about DNS 2. Learn

[Rails] paypal with Active merchant

2011-04-18 Thread News Aanad
Hi, I am integrating paypal service in my application using Activemerchant. Now I want to know how to use ActiveMerchant to make payment to Bank or Credit card ? for example: I am seller and I want to pay some amount to somebody. I want to pay such amount which will be credited in somebody's

[Rails] paypal with Active merchant

2011-04-18 Thread News Aanad
Hi, I am integrating paypal service in my application using Activemerchant. Now I want to know how to use ActiveMerchant to make payment to Bank or Credit card ? for example: I am seller and I want to pay some amount to somebody. I want to pay such amount which will be credited in somebody's

[Rails] Re: How to generate a form in rails 2.3.5

2011-04-18 Thread Ar Chron
amritpal p. wrote in post #993489: But i didnt explain in which file it should be written? Thanks Well, perhaps you would benefit from seeing a scaffolded response. At an OS prompt, type in: ruby script/generate scaffold person first_name:string

[Rails] Re: how to update data

2011-04-18 Thread Ar Chron
News Aanad wrote in post #993479: hi, I have json string in json request. i want to update the database using that string. how can i do that? There would be a multipal object in this string. sample string is:

Re: [Rails] ERROR NameError: uninitialized constant ActiveSupport::Dependencies

2011-04-18 Thread Bryan Crossland
On Sun, Apr 17, 2011 at 2:35 PM, doom spork li...@ruby-forum.com wrote: Hello all, I keep getting the following error after visiting 127.0.0.1:3000 on a fresh rails 3.0.6 install with ruby 1.9.2. I have tried googling solutions but most results are addressing the issue in rails 2 and

Re: [Rails] Assigning admin invalidates the user

2011-04-18 Thread Bryan Crossland
On Sun, Apr 17, 2011 at 12:14 PM, non useless nonusel...@gmail.com wrote: I am experiencing an issue as I am following the tutorial and currently at the end of chapter 10. When I use toggle in the rails console to flip the admin property of a user from false to true (I'm trying to create an

[Rails] rails runner giving problem

2011-04-18 Thread Mike Disuza
Hi, I have a rails 2.3.8 application, which has some ruby script in scripts folder which has ran through the cron. I just upgraded my application to rails 3. My problem is I am not able found a solution to run these scripts. In Rails 2.3.8:- ruby script/runner test.rb In Rails 3:- rails runner

Re: [Rails] file_column undefined method relative_url_root

2011-04-18 Thread Bryan Crossland
On Sun, Apr 17, 2011 at 12:32 PM, Tara Schultz tara.schu...@gmail.comwrote: I just installed and started using the file_column plugin and am getting the following error: No Method Error undefined method 'relative_url_root' for nil:NilClass Extracted source (around line #5) 5: %= image_tag

[Rails] Re: routes question rails 3.0 vs. rails 2.0

2011-04-18 Thread sol.manager
Google doesn't seem to want to post my reply properly. I wanted to say thank you as your last suggestion worked. I removed the offending = and my site is working with Solr properly now. Thank you. On Apr 17, 6:05 pm, Phil Crissman phil.criss...@gmail.com wrote: On Sun, Apr 17, 2011 at 4:17 PM,

[Rails] Rails3 integration with SourceForce

2011-04-18 Thread balakrishna.ka...@gmail.com
Hi, I looking forward to integrate Rail3 application with SourceForce. Any help in this regard is appreciated. Thanks, Balakrishna -- 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: Rails 3 Crashing On Windows 7

2011-04-18 Thread Bryan Crossland
On Sun, Apr 17, 2011 at 4:14 PM, cipher_neo l33...@gmail.com wrote: sorry, they are all the gems on my system. I only use the following: (from Gemfile) gem 'annotate-models', :require = 'annotate_models' gem 'ruby-debug19' gem 'populator' gem 'faker' gem mongrel, '1.2.0.pre2'

Re: [Rails] handling validation

2011-04-18 Thread Bryan Crossland
On Sun, Apr 17, 2011 at 5:01 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: I can post full code examples if necessary. That would be extremely helpful. B. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

Re: [Rails] Rails 3 render erb text

2011-04-18 Thread Bryan Crossland
On Sun, Apr 17, 2011 at 6:17 PM, Andrew Miehs and...@2sheds.de wrote: Hi all, I have a file called configure.text.erb in views/class/ directory. Why does render 'configure.text.erb' actually work? How does render know that this is plain text? Does it assume this due to the

[Rails] Re: unable to set default_url_options on per environment basis

2011-04-18 Thread Frederick Cheung
On Apr 17, 10:16 pm, charles d barryfrombarryvi...@gmail.com wrote: Im trying to set the default_url_options on a per environment basis but nothing is working. I keep getting Missing host to link to! Please provide :host parameter or set default_url_options[:host] post.rb def share_all  

Re: [Rails] Re: what is mean of Deployment?

2011-04-18 Thread Colin Law
On 18 April 2011 10:00, amrit pal pathak amritpalpath...@gmail.com wrote: ...     it will be created as rake db:create (after specifying in the production enviornment i,e database: production)??  and to start the server in production mode. To create the production database

Re: [Rails] Re: Problem with resque; parent process doesn't die

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 12:37 AM, Nilesh navale.nil...@gmail.com wrote: What if I explicitly exit process(using Process.exit(0)) in FooJob#perform after line Bar.add_jobs? No as that will kill your child processes as they start. You should take a look at Parents and Children as well as the

Re: [Rails] whyt should i use mongrel_cluster ?

2011-04-18 Thread Colin Law
On 18 April 2011 11:20, amrit pal pathak amritpalpath...@gmail.com wrote: why should i use mongrel_cluster in my rails application?  What are its benefits for which i should install and configure it Read up what a mongrel cluster is. If the answer to your question is not then obvious ask it

Re: [Rails] how to handle session with external input?

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 4:48 AM, frankblizzard tmaxim...@googlemail.comwrote: Hi, I hope I chose the right title for the question. I am doing a time tracking app for our intranet. Because the people tend to forget to save their hours, we made a small desktop app with adobe air that pops up

Re: [Rails] Unable to install Rails through proxy

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 4:58 AM, rubynewbie mohamed.shaf...@gmail.comwrote: I am new to Rails and have been facing difficulty while installing rails. I have already installed Ruby and RubyGems on my machine by downloading the packages. But when I install Rails through RubyGems through a HTTP

Re: [Rails] Re: Rails 3 Migration expecting test gems to be installed??

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 5:43 AM, johnnybutler7 johnnybutl...@gmail.comwrote: Yes i did bundle install --without test and that worked fine, when i try the db migrate for staging i get the error, i could install all the gems as you say rspec is needed for other stuff possibly but the actual

Re: [Rails] paypal with Active merchant

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 6:23 AM, News Aanad news.anan...@gmail.com wrote: Hi, I am integrating paypal service in my application using Activemerchant. Now I want to know how to use ActiveMerchant to make payment to Bank or Credit card ? for example: I am seller and I want to pay some amount

Re: [Rails] rails runner giving problem

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 7:44 AM, Mike Disuza li...@ruby-forum.com wrote: Hi, I have a rails 2.3.8 application, which has some ruby script in scripts folder which has ran through the cron. I just upgraded my application to rails 3. My problem is I am not able found a solution to run these

[Rails] please help:Can't initialize a new Rails application within the directory of another.

2011-04-18 Thread hoboy Hoboy
I have just install Netbeans 7.0. then install the plugins. But when I create a rails project I get the following errors: Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first. Type 'rails' for help. -- Posted via

Re: [Rails] Rails3 integration with SourceForce

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 6:01 AM, balakrishna.ka...@gmail.com balakrishna.ka...@gmail.com wrote: Hi, I looking forward to integrate Rail3 application with SourceForce. Any help in this regard is appreciated. Thanks, Balakrishna What is SourceForce? Did you mean SourceForge? B. --

[Rails] Re: Which editor to use

2011-04-18 Thread king key
www.wholesalesnkey.com windows 7 office 2007 office 2010 office visio key windows visio key windows xp key wholesale windows 7 key wholesale office 2007 key wholesale office 2010 key wholesale office visio key wholesale windows visio key wholesale windows xp key Cheap and easy to use Do not miss

[Rails] Re: Rails 3 Crashing On Windows 7

2011-04-18 Thread cipher_neo
It seems to die while processing dynamic javascript... I have a controller for managing the dynamic javascript (as documented here: http://railscasts.com/episodes/88-dynamic-select-menus) The exact lines that appear in the development.log file before the app crashes are: Started GET

Re: [Rails] paypal with Active merchant

2011-04-18 Thread David Kahn
On Mon, Apr 18, 2011 at 8:56 AM, Bryan Crossland bacrossl...@gmail.comwrote: On Mon, Apr 18, 2011 at 6:23 AM, News Aanad news.anan...@gmail.comwrote: Hi, I am integrating paypal service in my application using Activemerchant. Now I want to know how to use ActiveMerchant to make payment to

[Rails] Dynamic model validation

2011-04-18 Thread Alex Takitani
Hi, I am searching for a way to dynamic validate my models. The solution that I got working is: def after_initialize singleton = class self; self; end validations = eval(calendar.cofig) validations.each do |val| singleton.class_eval(val) end end On my actual app, I have 2 models

[Rails] how can i test a file content with cucumber

2011-04-18 Thread Isaac Jarquin
Hi everyone, im quite new in cucumber worl and I need to test a file content in cucumber and i cant find a clue of how to do it, could anyone help me ? -- 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: Unable to install Rails through proxy

2011-04-18 Thread rubynewbie
The problem is not inclusion of http:// in the URL(I tried without that). On the contrary I suspect the reason to be on how to specify the domain in the URL. Is my way of specifying the domain right? C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p

[Rails] Rails HTML5 Boilerplate Application Template

2011-04-18 Thread Russ
Just wanted to let fellow Rails users about a Rails application template I wrote to help speed up the process of starting new Rails projects that will make use of Paul Irish's HTML 5 Boilerplate (http://html5boilerplate.com/). Project location:

Re: [Rails] Rails 3 render erb text

2011-04-18 Thread Andrew Miehs
On Mon, Apr 18, 2011 at 2:59 PM, Bryan Crossland bacrossl...@gmail.comwrote: On Sun, Apr 17, 2011 at 6:17 PM, Andrew Miehs and...@2sheds.de wrote: Why does render 'configure.text.erb' actually work? How does render know that this is plain text? Does it assume this due to the

Re: [Rails] DateTime + x.days, x.minutes and the like?

2011-04-18 Thread David Kahn
On Sat, Apr 16, 2011 at 4:37 AM, David Kahn d...@structuralartistry.comwrote: On Sat, Apr 16, 2011 at 1:01 AM, Bryan Crossland bacrossl...@gmail.comwrote: On Fri, Apr 15, 2011 at 1:56 PM, David Kahn d...@structuralartistry.comwrote: On Fri, Apr 15, 2011 at 1:50 PM, Michael Pavling

Re: [Rails] handling validation

2011-04-18 Thread Matt Harrison
On Mon, Apr 18, 2011 at 07:51:49AM -0500, Bryan Crossland wrote: On Sun, Apr 17, 2011 at 5:01 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: I can post full code examples if necessary. That would be extremely helpful. Ok, here is the controller code:

Re: [Rails] DateTime + x.days, x.minutes and the like?

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 10:38 AM, David Kahn d...@structuralartistry.comwrote: On Sat, Apr 16, 2011 at 4:37 AM, David Kahn d...@structuralartistry.comwrote: On Sat, Apr 16, 2011 at 1:01 AM, Bryan Crossland bacrossl...@gmail.comwrote: On Fri, Apr 15, 2011 at 1:56 PM, David Kahn

[Rails] Re: what is mean of Deployment?

2011-04-18 Thread amrit pal pathak
On Apr 18, 11:41 am, dana tassler dana.tass...@gmail.com wrote: As always, Colin has at least one good point.  And I would add to that. Initially, you asked what is meant by deployment.  Several people did provide the answer to that question, at which point this topic could safely have

[Rails] Re: what is mean of Deployment?

2011-04-18 Thread amrit pal pathak
On Apr 18, 9:07 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011 10:00, amrit pal pathak amritpalpath...@gmail.com wrote: ...     it will be created as rake db:create (after specifying in the production enviornment i,e database: production)??  and to start the server in

[Rails] Re: what is mean of Deployment?

2011-04-18 Thread dana tassler
As always, Colin has at least one good point. And I would add to that. Initially, you asked what is meant by deployment. Several people did provide the answer to that question, at which point this topic could safely have been considered closed. Being resourceful is always a good idea.

Re: [Rails] Re: what is mean of Deployment?

2011-04-18 Thread Colin Law
On 18 April 2011 17:12, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 18, 9:07 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011 10:00, amrit pal pathak amritpalpath...@gmail.com wrote: ...     it will be created as rake db:create (after specifying in the

Re: [Rails] DateTime + x.days, x.minutes and the like?

2011-04-18 Thread Philip Hallstrom
This cant be so hard but feeling rather annoyed with myself for thinking I can do the following: DateTime.now + 1.day Is there any easy way to do this? I prefer to use .since and .ago: DateTime.now.since(1.day) Hmmm, I like the idea but getting an error - I am in rails

[Rails] Re: what is mean of Deployment?

2011-04-18 Thread amrit pal pathak
On Apr 18, 12:30 pm, Colin Law clan...@googlemail.com wrote: On 18 April 2011 17:12, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 18, 9:07 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011 10:00, amrit pal pathak amritpalpath...@gmail.com wrote: ...     it

Re: [Rails] Re: what is mean of Deployment?

2011-04-18 Thread Colin Law
On 18 April 2011 17:46, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 18, 12:30 pm, Colin Law clan...@googlemail.com wrote: On 18 April 2011 17:12, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 18, 9:07 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011

Re: [Rails] please help:Can't initialize a new Rails application within the directory of another.

2011-04-18 Thread Vladimir Rybas
Can't initialize a new Rails application within the directory of another You're trying to create Rails project through Netbeans and specifying a path to an existing Rails project. If you want, kinda, import the existing Rails project to Netbeans, you should choose to create New Rails project with

[Rails] acts_as_commentable validations

2011-04-18 Thread Tony Tony
Hi all, I recently started back up with Rails and things are going well up until now. I've set up acts_as_commentable in my Post model and it's working great. Problem is users are able to create a blank comment. I've added the following validations in the comment.rb file generated by

[Rails] Re: Ruby On Rails 3 and Webrick

2011-04-18 Thread kdwill
Here's where this noob gets nailed. I tried installing the suggested sudo and got command not found. Then I looked for the brew for mac and I'm just not getting it. Radhames, thanks for your help and patience. If others have suggestions of what I'm missing here, please add your voice. All help

[Rails] Re: Ruby On Rails 3 and Webrick

2011-04-18 Thread kdwill
By noob, I mean me. I'm the noob. Sorry for any confusion. On Apr 18, 10:30 am, kdwill pushplayme...@hotmail.com wrote: Here's where this noob gets nailed. I tried installing the suggested sudo and got command not found. Then I looked for the brew for mac and I'm just not getting it.

[Rails] Re: rubygems fail - require hpricot!

2011-04-18 Thread Anush J.
Frederick Cheung wrote in post #993456: On Apr 18, 7:12am, Anush J. li...@ruby-forum.com wrote: Hi guys, I wanted to fetch some info from webpage and use it in my db. I read hpricot is one way to do it. But the problem is I'm unable to use it with my app. For some reason after successfully

[Rails] has a field through an association

2011-04-18 Thread Garrett Lancaster
Hey guys, Trying to figure out how to do something like the following: class Child belongs_to :parent has_field :some_field, :through = :parent end class Parent has_one :child attr_accessible :some_field end child.some_field #= parent.some_field child.some_field = value #=

Re: [Rails] Re: Rails 3 Crashing On Windows 7

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 9:28 AM, cipher_neo l33...@gmail.com wrote: It seems to die while processing dynamic javascript... I have a controller for managing the dynamic javascript (as documented here: http://railscasts.com/episodes/88-dynamic-select-menus) The exact lines that appear in the

Re: [Rails] DateTime + x.days, x.minutes and the like?

2011-04-18 Thread Michael Pavling
On 18 April 2011 16:38, David Kahn d...@structuralartistry.com wrote: Am still perplexed by this output (ruby 1.8.7-p330 on 64bit/Snow Leopard): ruby-1.8.7-p330 :001 DateTime.now  = #DateTime 2011-04-18T10:35:18-05:00 ruby-1.8.7-p330 :002 DateTime.now + 1.day  = #DateTime

Re: [Rails] DateTime + x.days, x.minutes and the like?

2011-04-18 Thread David Kahn
On Mon, Apr 18, 2011 at 1:11 PM, Michael Pavling pavl...@gmail.com wrote: On 18 April 2011 16:38, David Kahn d...@structuralartistry.com wrote: Am still perplexed by this output (ruby 1.8.7-p330 on 64bit/Snow Leopard): ruby-1.8.7-p330 :001 DateTime.now = #DateTime

[Rails] best practices for debugging errors on production mode on server

2011-04-18 Thread John Merlino
Hey all, I think I need some help with best practices for debugging. So I am familiar with logger.info e.g. The variable is #{@variable}. This helps when I want to inspect the value of a variable on my local machine. However, it doesn't get output to the production log so when the site runs on

[Rails] Re: How to convert this sql into named_scope

2011-04-18 Thread Tim Shaffer
Correct me if I'm wrong, but can't that query be rewritten as follows: select event_id, user_id, max(invite_time) as last_invite_time from invitations where event_id = @event_id group by event_id, user_id Basically you want to get distinct event_id and user_id and the latest invite_time? No

[Rails] Re: best practices for debugging errors on production mode on server

2011-04-18 Thread Frederick Cheung
On Apr 18, 7:34 pm, John Merlino li...@ruby-forum.com wrote: Hey all, I think I need some help with best practices for debugging. So I am familiar with logger.info e.g. The variable is #{@variable}. This helps when I want to inspect the value of a variable on my local machine. However, it

Re: [Rails] how can i test a file content with cucumber

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 9:20 AM, Isaac Jarquin isaacjarq...@gmail.comwrote: Hi everyone, im quite new in cucumber worl and I need to test a file content in cucumber and i cant find a clue of how to do it, could anyone help me ? This should help you. It's amazing what you can find on the

[Rails] Gem install error

2011-04-18 Thread Pedro
Hi There, Im trying to install vagrant , but I got the error below. Probably it is an environment issue, Im using MINGW32, WIN XP. Does anybody know how to solve it? Thanks! Pedro $ gem install vagrant Building native extensions. This could take a while... ERROR: Error installing vagrant:

Re: [Rails] Re: Unable to install Rails through proxy

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 9:54 AM, rubynewbie mohamed.shaf...@gmail.comwrote: The problem is not inclusion of http:// in the URL(I tried without that). On the contrary I suspect the reason to be on how to specify the domain in the URL. Is my way of specifying the domain right? C:\Documents and

Re: [Rails] acts_as_commentable validations

2011-04-18 Thread Colin Law
On 18 April 2011 18:22, Tony Tony li...@ruby-forum.com wrote: Hi all, I recently started back up with Rails and things are going well up until now. I've set up acts_as_commentable in my Post model and it's working great. Problem is users are able to create a blank comment. I've added the

[Rails] Simple Parameter Passing

2011-04-18 Thread Sig Luft
Hi, I'm trying to put together a really simple application, which only uses Rails in the most rudimentary manner. Basically, I have a command line application that takes one parameter, and returns the necessary text in return. I also have an existing web site that can call a URL with a ?param.

[Rails] Re: acts_as_commentable validations

2011-04-18 Thread Tony Tony
Colin Law wrote in post #993612: On 18 April 2011 18:22, Tony Tony li...@ruby-forum.com wrote: The show view form for the comment is the following: However I am getting the following error only when validation fails (if a normal length comment is created the site works): [code] Template is

Re: [Rails] Simple Parameter Passing

2011-04-18 Thread Colin Law
On 18 April 2011 21:11, Sig Luft li...@ruby-forum.com wrote: Hi, I'm trying to put together a really simple application, which only uses Rails in the most rudimentary manner. Basically, I have a command line application that takes one parameter, and returns the necessary text in return.  I

[Rails] Simple UJS Fields

2011-04-18 Thread Tom Ricks
Hello, I have the view: % form_tag '/' do % %= number_field_tag(:number_one) % %= number_field_tag(:number_two) % %= submit_tag 'Calculate' % % end % %= @number % and the controller: def add numberone = params[:number_one].to_f numbertwo = params[:number_two].to_f @number =

[Rails] TypeError (Cannot visit Category):

2011-04-18 Thread John Merlino
Hey all, this order_by method right here is throwing an exception: @resource_model.order_by(@order_field) The exception is TypeError (Cannot visit Category): I think it's returning this: #ActiveRecord::Relation:0x01038701f0 I have no clue why. It's supposed to be returning a string like

[Rails] put alias in Model.find query

2011-04-18 Thread Ad Ber
Hi to all, I want to be able to put alias to my Song.find query. the artist field belongs to song model so that i could code efficiently in sorting columns. I want to put an (s) alias to my Song model. In the code below :select = artist, g.genre_name AS name_genre should be :select = s.artist,

Re: [Rails] Re: Ruby On Rails 3 and Webrick

2011-04-18 Thread Bryan Crossland
On Mon, Apr 18, 2011 at 12:46 PM, kdwill pushplayme...@hotmail.com wrote: By noob, I mean me. I'm the noob. Sorry for any confusion. Brew for Mac https://github.com/mxcl/homebrew The command not found is referring to apt-get which is not on Mac (hence his pointing you to Brew). B. On

[Rails] Re: put alias in Model.find query

2011-04-18 Thread Ad Ber
Uhm...I figured out how to do it.. Song.find(:all, :select = AS s artist, g.genre_name AS name_genre, :joins = LEFT OUTER JOIN genres AS g on songs.genre_id = g.id, :order = params[:sort]) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] [ANN] Rails 3.0.7 has been released!

2011-04-18 Thread Aaron Patterson
Hello everyone! I hope you're having an AMAZING Monday. If you Monday wasn't AMAZING enough already, I've decided to make it even better by releasing Rails version 3.0.7! (As a side note, sometimes I have a hard time telling if my day is AMAZING or FABULOUS. If anyone has hints, let me know!)

[Rails] Re: How to change the url (from localhostL:3000) to (example.com)

2011-04-18 Thread Tom Ricks
I am very new to rails as well, but I am pretty sure that's not possible in development mode, and why would you want to do it, developing under local is much faster than having to update your server files every time. You would have to deploy it to change the url that its under, like get a

[Rails] Drying my code ..

2011-04-18 Thread Erwin
I am parsing an xml result using Hpricot, amazing .. I have a serie of tags to be transformed as parameters, so I am building Hash by looping on these tags , the resulting data is oK? but I ma not sure that I wrote a dry code ... if doc.search('response error').innerHTML.empty?

  1   2   >