Re: [Rails] starting thinking sphinx on server reboot

2011-02-06 Thread loganathan sellappa
you can start ts by rake ts:start -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: how to get rid of nil values in session?

2011-02-06 Thread Robert Pankowecki (rupert)
On Feb 6, 12:47 am, ivanpoval ivanpo...@gmail.com wrote: Maybe there is no need to delete the keys on the session if those have nil as value. Probably rails doesn't pass them into the cookie anyway. But I would do an experiment to make sure. Session Hash storage is usually a

Re: [Rails] Re: how to get rid of nil values in session?

2011-02-06 Thread Colin Law
On 6 February 2011 08:27, Robert Pankowecki (rupert) robert.pankowe...@gmail.com wrote: On Feb 6, 12:47 am, ivanpoval ivanpo...@gmail.com wrote: Maybe there is no need to delete the keys on the session if those have nil as value. Probably rails doesn't pass them into the cookie anyway. But I

[Rails] Re: starting thinking sphinx on server reboot

2011-02-06 Thread Mike C
I know that, but I want it to start automatically whenever the server restarts so I dont have to run that command myself. I want this automated. On Feb 6, 12:11 am, loganathan sellappa loganathan...@gmail.com wrote: you can start ts by rake ts:start -- You received this message because you are

Re: [Rails] rails routes into application.js

2011-02-06 Thread Mauro
On 5 February 2011 19:23, Jason Lewis jasonlewi...@gmail.com wrote: Well, it depends on whether it's a link or form. It is just a button: button id=printedPrint/button -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Which install method for rvm on production server?

2011-02-06 Thread Fernando Perez
Hi, I read a lot of stuff about rvm so I want to use it on my production server, but which installation method should I use? site-wide? Thanks for your advice -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Which install method for rvm on production server?

2011-02-06 Thread Frederick Cheung
On Feb 6, 11:06 am, Fernando Perez li...@ruby-forum.com wrote: Hi, I read a lot of stuff about rvm so I want to use it on my production server, but which installation method should I use? site-wide? I use a system wide deployment ( http://rvm.beginrescueend.com/deployment/best-practices/ )

Re: [Rails] Re: Strange rake error with config.cache_classes

2011-02-06 Thread Xavier Noria
On Sat, Feb 5, 2011 at 11:32 PM, tashfeen.ekram tashfeen.ek...@gmail.com wrote: Ahhh. Now, I understand your comment but this also confuses me. 1. rake thinking_sphinx:configure no prob 2. rake thinking_sphinx:configure RAILS_ENV=production problem 3. rake db:migrate no prob 4. rake

[Rails] Re: Which install method for rvm on production server?

2011-02-06 Thread Nikos Dimitrakopoulos
I was thinking to do the same with an upcoming deployment. Does anyone have experience on this to point out possible downsides? On Sunday, February 6, 2011 1:31:01 PM UTC+2, Frederick Cheung wrote: On Feb 6, 11:06 am, Fernando Perez li...@ruby-forum.com wrote: Hi, I read a lot of

[Rails] Re: Which install method for rvm on production server?

2011-02-06 Thread Fernando Perez
I use a system wide deployment ( http://rvm.beginrescueend.com/deployment/best-practices/ ) Fred Thank you Fred, I had missed that page. By the way I read that it is suggested to use a different user per application. Therefore, is there a general rails deployment best practices somewhere?

[Rails] Re: heroku SQL columnName problems

2011-02-06 Thread Avi K.
Try to use Xeround free SQL database on Heroku, if you want, send a message to kopp...@gmail.com to get in invite -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] best way to crud 2d hash with ranges

2011-02-06 Thread Eze Eze
I have a Product model (name:string, value:integer, quality:integer) and different table for each product with percent's. Real value of product depend on the percent from the table, taked from value range and quality range. For example I have this table for first product (row = quality range,

[Rails] Re: Questions about Chapter 9: Sign in, Sign out of RoR Tutorial | Learn Rails by Example

2011-02-06 Thread Filippos
right, ok , that makes sense. But in this chapter i see that the author is avoiding using a model. Is this a common practice in rails or just a personal choice of the author? What if we want to list the users who are currently logged in our website ? That would require a model with access to the

[Rails] Re: Which install method for rvm on production server?

2011-02-06 Thread Frederick Cheung
On Feb 6, 12:30 pm, Fernando Perez li...@ruby-forum.com wrote: I use a system wide deployment ( http://rvm.beginrescueend.com/deployment/best-practices/ ) Fred Thank you Fred, I had missed that page. By the way I read that it is suggested to use a different user per application.

Re: [Rails] starting thinking sphinx on server reboot

2011-02-06 Thread Hassan Schroeder
On Sat, Feb 5, 2011 at 11:51 PM, Mike C snib...@gmail.com wrote: I wanna know how I can start my thinking_sphinx and its delayed delta when I reboot my server. I'm not particularly familiar with sphinx, no idea what delayed delta means, but if you're talking about the sphinx daemon itself, the

[Rails] rspec-2.5.0 is released!

2011-02-06 Thread David Chelimsky
RSpec-2.5.0 is released! This is a minor upgrade, and is fully backward compatible with rspec-2.4. It includes several bug fixes, enhancements, and one deprecation. See the changelog below for details. We had a little glitch publishing the docs to

[Rails] Use text file to add test data

2011-02-06 Thread Kelly Pfaff
Hi, Im trying to make an application based on the 'depot' app from 'Agile web development with Rails'. Instead of putting the data in add_test_data.rb itself (p.89), I want to read it in from a txt file like this (gg.txt has a list of front and last names): class AddTestData

[Rails] Re: Which install method for rvm on production server?

2011-02-06 Thread Fernando Perez
On my Leopard dev machine I have installed rvm+1.9.2 and everything seems fine, function, rubygems, environment, etc. But when I want to install my first gem (hint: rails 3) I get the following error message: $ gem install rails ERROR: While executing gem ... (Errno::EACCES) Permission

[Rails] Re: Which install method for rvm on production server?

2011-02-06 Thread Fernando Perez
Fernando Perez wrote in post #979907: $ gem install rails ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/fernando/.gem/specs From what I have read here and there, it seems that this directory was chowned to root when I used evil sudo gem install I delected the

[Rails] Re: Use text file to add test data

2011-02-06 Thread Frederick Cheung
On Feb 6, 5:18 pm, Kelly Pfaff li...@ruby-forum.com wrote: Hi, Im trying to make an application based on the 'depot' app from 'Agile web development with Rails'. Instead of putting the data in add_test_data.rb itself (p.89), I want to read it in from a txt file like this (gg.txt has a list

[Rails] what is the best way to limit resourceful routes to a certain subset

2011-02-06 Thread lix
Hi, I would like use only few routes out of the 7 default. I am wondering what would be the most efficient solution: simple write match rules or use get for this... thank you in advance. I. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: what is the best way to limit resourceful routes to a certain subset

2011-02-06 Thread Markus Proske
I would like use only few routes out of the 7 default. I am wondering what would be the most efficient solution: simple write match rules or use get for this... You can define this in your routes.rb: resources :comments, :only = [:create, :destroy] Markus -- You received this message

[Rails] Re: Use text file to add test data

2011-02-06 Thread Kelly Pfaff
Thanks for the speedy reply Fred. I've relocated gg.txt to the right directory, and now a new error pops up, as you have foreseen: Undefined method 'process' ... What can i do to solve this? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Difference in redirect_to behaviour (Firefox, IE 7)

2011-02-06 Thread Wim Neimeijer
Hi, Using Rails 3.0.3 on Ubuntu 10. In my application controller I have a before filter which checks where or not a User has some comment records. If no comment records our found, a redirection is issued to the main page. All my rspec/cucumber tests passed. So I thought start the server and

[Rails] Re: Use text file to add test data

2011-02-06 Thread Kelly Pfaff
Kelly Pfaff wrote in post #979916: Thanks for the speedy reply Fred. I've relocated gg.txt to the right directory, and now a new error pops up, as you have foreseen: Undefined method 'process' ... What can i do to solve this? I made process a class method too, now it works.. -- Posted via

Re: [Rails] Dynamic Css from database

2011-02-06 Thread Garrett Lancaster
not sure I would go about it this way. You could just dynamically apply a class in the view based on a single db value. Garrett Lancaster Mitchell Gould mailto:li...@ruby-forum.com February 2, 2011 11:26 PM

[Rails] Re: what is the best way to limit resourceful routes to a certain subset

2011-02-06 Thread lix
Markus, fantastic, this is what I need! Thank you so much! Regards, Istvan On Feb 6, 5:54 pm, Markus Proske markus.pro...@gmail.com wrote: I would like use only few routes out of the 7 default. I am wondering what would be the most efficient solution: simple write match rules or use get

[Rails] when is_a? fails and a Foo isn't a Foo

2011-02-06 Thread Ryan Mohr
This is a weird one. It would be one thing if is_a? failed consistently but if I refresh the page the second attempt always works. I have the following code that works fine every time: @node = Node.find(params[:id]) @node.is_a?(Node) # = always will return true However I recently added an

[Rails] Re: when is_a? fails and a Foo isn't a Foo

2011-02-06 Thread Ryan Mohr
More info to work off. When I swap out rails shorthand query of current_account.nodes.find(params[:id]) with Node.find(params[:id], :conditions = ['account_id = ?', current_account.id]) everything works fine. -- Posted via http://www.ruby-forum.com/. -- You received this message

Re: [Rails] Difference in redirect_to behaviour (Firefox, IE 7)

2011-02-06 Thread Colin Law
On 6 February 2011 18:06, Wim Neimeijer li...@ruby-forum.com wrote: Hi, Using Rails 3.0.3 on Ubuntu 10. In my application controller I have a before filter which checks where or not a User has some comment records. If no comment records our found, a redirection is issued to the main page.

[Rails] Re: Difference in redirect_to behaviour (Firefox, IE 7)

2011-02-06 Thread Gummybears Gummybears
Well the HTML is valid (checked with w3c html validator as you mentioned) and the scenario outline are an excerpt from the Rails log. Via google I noticed two people mentioning the same problem but alas no solution. A fix was mentioned to set the request.env to js when redirecting or use the

[Rails] Re: when is_a? fails and a Foo isn't a Foo

2011-02-06 Thread Nikos Dimitrakopoulos
Could it be something that has to do with ARel and instead of getting an object as a result you get an active relation/proxy? -- 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] Empty file_field error

2011-02-06 Thread Paul Bergstrom
If a file_field is empty it gives me an error. If I check it with nil? or blank? or size it stills gives me an error. What should I do to check if it has a file or not? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] has_many :through question

2011-02-06 Thread slava
Hi, I am having some difficulty getting has_many relationship setup correctly. def acts_as_markable has_many :marks, :as = :markable belongs_to :author, :class_name = WebsiteUser end class Video ActiveRecord::Base set_table_name markables acts_as_markable end

Re: [Rails] Re: what is the best way to limit resourceful routes to a certain subset

2011-02-06 Thread Colin Law
On 6 February 2011 19:46, lix lecc...@gmail.com wrote: Markus, fantastic, this is what I need! Thank you so much! Regards, Istvan On Feb 6, 5:54 pm, Markus Proske markus.pro...@gmail.com wrote: I would like use only few routes out of the 7 default. I am wondering what would be the most

[Rails] Re: when is_a? fails and a Foo isn't a Foo

2011-02-06 Thread Ryan Mohr
That was my first thought but it doesn't appear to be the case. If it were the class of the returned object should be ActiveRecord::Relation instead of Node. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: how to get rid of nil values in session?

2011-02-06 Thread ivanpoval
On Feb 6, 12:47 am, ivanpoval ivanpo...@gmail.com wrote: Maybe there is no need to delete the keys on the session if those have nil as value. Probably rails doesn't pass them into the cookie anyway. But I would do an experiment to make sure. Session Hash storage is usually a

[Rails] link_to with raw included

2011-02-06 Thread Sean Six
I want to allow the path upload.img_path in my link. upload.img_path is a path to an image. [code] %= raw upload.img_path % [/code] correctly displays the image. But, I can't figure out how to do this with a link. [code] %= link_to raw(upload.img_path, upload) % [/code] gives the error: wrong

Re: [Rails] link_to with raw included

2011-02-06 Thread Phil Crissman
I think you want: %= link_to raw(upload.img_path), upload % No? Phil On Sun, Feb 6, 2011 at 5:25 PM, Sean Six li...@ruby-forum.com wrote: I want to allow the path upload.img_path in my link. upload.img_path is a path to an image. [code] %= raw upload.img_path % [/code] correctly

[Rails] Re: link_to with raw included

2011-02-06 Thread Sean Six
Phil Crissman wrote in post #979960: I think you want: %= link_to raw(upload.img_path), upload % No? Phil %= link_to raw(upload.img_path), upload % That works. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: Dynamic Css from database

2011-02-06 Thread Mitchell Gould
Garrett Lancaster wrote in post #979922: not sure I would go about it this way. You could just dynamically apply a class in the view based on a single db value. Garrett Lancaster You are so right. I think I will just create the different css and html for each template. Easier and I won't

Re: [Rails] Re: ActionMailer

2011-02-06 Thread Bhasker Harihara
Hi Walter, Thank you very much. Is there any tutorial for rails generate mailer Regards On Sat, Feb 5, 2011 at 10:51 PM, djangst djan...@gmail.com wrote: If the messages are to remain inside your application and this is a learning exercise, then I suggest writing your own system. If you

[Rails]

2011-02-06 Thread loganathan sellappa
hi, i'm using solar server in my app, in my model class Resume ActiveRecord::Base require 'rexml/document' include REXML acts_as_solr :fields = [:firstname, :lastname] end but while reindexing ,having the following error Requiring REXML Clearing index for Resume... rake aborted! Couldn't

[Rails] Re: when is_a? fails and a Foo isn't a Foo

2011-02-06 Thread Frederick Cheung
On Feb 6, 9:48 pm, Ryan Mohr li...@ruby-forum.com wrote: That was my first thought but it doesn't appear to be the case.  If it were the class of the returned object should be ActiveRecord::Relation instead of Node. It's worth noting that class is a method like any other in ruby and can

[Rails] dependencies problem

2011-02-06 Thread harika grandhi
hi, i am new to ruby on rails,i want to remove a field from the edit screen,how to know whether removing that field will effect the other screens. i want to remove the below code from my controller config.columns[:status].form_ui = :radio config.columns[:status].options = {}