[Rails] Re: I'm restarting to work with ruby on rails, but having configurations problems

2009-09-26 Thread Delirium tremens
On 26 set, 02:47, Delirium tremens pedbe...@gmail.com wrote: On 26 set, 02:29, Delirium tremens pedbe...@gmail.com wrote: I have the Shovell source code from the book Simply Rails 2, but I'm having problems running it. preGetting started Here’s how to get rolling:    1.      

[Rails] Re: customize active record attribute display name in error message

2009-09-26 Thread drewB
That is exactly what I was looking for! Thank you! On Sep 25, 3:17 pm, richardun richar...@gmail.com wrote: I responded just a bit ago, but I don't see my response, so hopefully there won't be two responses... Essentially, Drew, you can map the column to be something else when you call

[Rails] Re: Editing Tutorials

2009-09-26 Thread Joe
Any1?? (Soz for bump, im just RLLY desperate to fix) On Sep 25, 6:02 pm, Joe j...@dev-hq.co.uk wrote: Then I get this error on the tutorial show page: edit_category_tutorial_url failed to generate from {:action=edit, :controller=tutorials, :category_id=#Tutorial id: 14, category_id: 1,

[Rails] Re: how to pass value to method in controller

2009-09-26 Thread Aashish Kiran
Aashish Kiran wrote: how to pass value to method in controller using button_to_remote button_to_remote 'check avaliability', :url = { :action = 'check_for_unique_login', :login = @user.login} above code is not working. value can be params -- Posted via

[Rails] Re: how to pass value to method in controller

2009-09-26 Thread Aashish Kiran
Aashish Kiran wrote: Aashish Kiran wrote: how to pass value to method in controller using button_to_remote button_to_remote 'check avaliability', :url = { :action = 'check_for_unique_login', :login = @user.login} above code is not working. value can be params -- Posted

[Rails] Re: removing attribute prefix from validation error messages

2009-09-26 Thread ranjan kumar
Try this class User ActiveRecord::Base validate do |user| user.errors.add_to_base(This is my custom message) if user. attribute_name.blank? end end On Sat, Sep 26, 2009 at 2:52 PM, bgumbiker bogumil.bial...@gmail.comwrote: Hello, Any idea how to remove attribute name from validation

[Rails] Re: Drop down list ?

2009-09-26 Thread Colin Law
2009/9/25 Dudebot craign...@gmail.com: The weird thing is that it is working now with f.collection_select :category_id, Category.all, :id, :header instead of f.collection_select :category_id, Category.all, :id, :header, {}, :multiple = false so :multiple = false seems to be the problem.  

[Rails] Re: Rails Authentication Tutorial

2009-09-26 Thread ruchika
Hey Kevin use this restful authentication i have used it in my many projects and its working fine. http://railsforum.com/viewtopic.php?pid=74245#p74245 On Sep 25, 10:46 am, s.ross cwdi...@gmail.com wrote: Hello-- On Sep 24, 2009, at 7:56 PM, Kevin M wrote: I started fresh and did

[Rails] Config XLSUITE in Windows

2009-09-26 Thread Rajesh Rajesh
I try to config XLSUITE in my system. I'm facing some problem i resolved it one by one. now im facing this error = Booting Mongrel (use 'script/server webrick' to force WEBrick) = Rails 2.2.0 application starting on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server **

[Rails] Re: Editing Tutorials

2009-09-26 Thread Joe
Yes correct I am desperate rather often as I was supposed to only take my site down for a few says to do this and it hs extended onto weeks. I will read the link (although im so bas in RoR im not honestly sure if i'll understand it), If anyone wants to give a more direct answer please feel

[Rails] Re: Cheapest Rails Hosting where they give you full access to Apache (to load modules etc)???

2009-09-26 Thread Trausti Thor Johannsson
Dreamhost.com is cheap, but does not allow any httpd changes, but you can do .htaccess files.But slicehost.com is by far the best I have seen. You just get a linux box, and you can then setup the server as you see fit, want to use mongrel, use mongrel, want ngnx or lighttpd instead of apache.

[Rails] removing attribute prefix from validation error messages

2009-09-26 Thread bgumbiker
Hello, Any idea how to remove attribute name from validation error messages? thanks, bogumbiker --~--~-~--~~~---~--~~ 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 check type of ajax response

2009-09-26 Thread bgumbiker
Hello, When my post message is successfully saved I am returning simple message via: flash[:notice] = OK and when there are some errors due to validation I return the message in similar way: flash[:notice] = form.errors.to_xml() then the message is sent via ajax: respond_to do |format|

[Rails] Ruby on Rails - Developers for NCR Delhi

2009-09-26 Thread Indus
Hi , We are looking for RUBY ON RAILS professionals for our UK Base clients for Gurgaon office. Pl confirm me asap with your updated resume with following details on sbsconsulti...@gmail.com or indusconsulti...@gmail.com Technology- Ruby on Rails Experience- 3+yrs Location: Gurgaon Pl also send

[Rails] Re: uniqueness validation perplexity

2009-09-26 Thread Marnen Laibow-Koser
Dudebot wrote: I appreciate the help, Marnen. In fact, I have http://api.rubyonrails.org/ permanently up while coding rails, and it's the tab to the left of my email as I write this. I always go first to it, then the guides, then a Google search, and only then do I post here. However, as

[Rails] Heroku

2009-09-26 Thread Jan Kadera
Hi, have anyone some experience with Heroku? I have an account there, but I'm unable to tell git to work with it. Can some of you help me please? Regards Jan Kadera --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Heroku

2009-09-26 Thread Nicolai Constantin Reuschling
So you are really asking the Rails mailing list for help with a tool interfacing with a service provider? Nicolai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: uniqueness validation perplexity

2009-09-26 Thread Dudebot
I appreciate the help, Marnen. In fact, I have http://api.rubyonrails.org/ permanently up while coding rails, and it's the tab to the left of my email as I write this. I always go first to it, then the guides, then a Google search, and only then do I post here. However, as one new to rails, I

[Rails] how to pass value to method in controller

2009-09-26 Thread Aashish Kiran
how to pass value to method in controller using button_to_remote button_to_remote 'check avaliability', :url = { :action = 'check_for_unique_login', :login = @user.login} above code is not working. -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Heroku

2009-09-26 Thread Conrad Taylor
Hi Jan, I would recommend speaking with your account representatives or the Heroku support because there may be configuration issues with your account. Good luck, -Conrad On Sat, Sep 26, 2009 at 3:50 AM, Jan Kadera honza.kad...@gmail.com wrote: Hi, have anyone some experience with Heroku? I

[Rails] Re: cms like routes

2009-09-26 Thread fredd
I think I solved it my self actually! It turns out that if you name the id parameter something else (like article_id) Rails actually divides the params correctly. So this route: map.article_by_id '*sections/:article_id', :controller = articles, :action = show, :article_id = /\d|\d-(.+)/ would

[Rails] Re: Editing Tutorials

2009-09-26 Thread Marnen Laibow-Koser
Joe wrote: Any1?? You couldn't wait 24 hours to bump? You couldn't bother to type full words? Those two things tend to really annoy those in a position to help. (Soz for bump, im just RLLY desperate to fix) Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted

[Rails] autotest: No such file or directory - -u (Errno::ENOENT)

2009-09-26 Thread Joe Hannes
Hi there, I currently can not get autottest to run: loading autotest/rails /opt/local/bin/ruby -I.:lib:test -rubygems -e %w[test/unit test/functional/home_controller_test.rb test/unit/helpers/home_helper_test.rb].each { |f| require f } | unit_diff -u

[Rails] Re: how to pass value to method in controller

2009-09-26 Thread Colin Law
2009/9/26 Aashish Kiran rails-mailing-l...@andreas-s.net: how to pass value to method in controller using button_to_remote    button_to_remote 'check avaliability',          :url = { :action = 'check_for_unique_login', :login = @user.login} above code is not working. What is not working

[Rails] Re: collection_select default selected value

2009-09-26 Thread horliao
This is useful about collection_select :) http://shiningthrough.co.uk/blog/show/6 On Sep 24, 12:13 am, Eunice Tan rails-mailing-l...@andreas-s.net wrote: Hi, I have some issues with setting the selected value. On my page, user selects a State from the drop down and other attributes and

[Rails] Re: Calling ActionView from uninheriting class

2009-09-26 Thread Rick
The easy way to resolve this type of problem is through: http// api.rubyonrails.org The Methods panel has, for your example, number_to_currency (ActionView::Helpers::NumberHelper) On Sep 24, 3:17 pm, Dudebot craign...@gmail.com wrote: Hi Gurus, I have a class, specified in models cart.rb, which

[Rails] Re: Cheapest Rails Hosting where they give you full access to Apache (to load modules etc)???

2009-09-26 Thread Jeffrey L. Taylor
My m1.small instance on AWS costs me $75-$80/month. Rackspace does offer smaller configurations than AWS. When you compare similar configurations, e.g., 1.5GB - 2.0GB memory, costs are similar. When I was comparing the two, Rackspace was having a lot of downtime, 3-5/day, and Amazon wasn't,

[Rails] Re: dynamic form problem

2009-09-26 Thread Greg Donald
On Fri, Sep 25, 2009 at 5:49 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: I assumed the OP meant trtd/td/tr empty Yeah, typo, I usually do something like tdnbsp;/td -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message

[Rails] Re: Editing Tutorials

2009-09-26 Thread richardun
Marnen is right. You're not going to get far with people's help most places if you don't take the minimal effort to be courteous (or at least stop using Soz). You seem to be desperate rather often (http://groups.google.com/group/ rubyonrails-talk/browse_thread/thread/

[Rails] Re: I'm restarting to work with ruby on rails, but having configurations problems

2009-09-26 Thread Richard Navarrete
http://lmgtfy.com/?q=uninitialized+constant+ApplicationController This code must be from before 2.3... you need to update it: :; rake rails:update Or, you can rename the controllers/application.rb file to controllers/application_controller.rb - but you're better off running the command.

[Rails] Re: Editing Tutorials

2009-09-26 Thread Joe
Strangely.. I acctually figured out what was wrong and corrected to: edit_category_tutorial_path(@tutorial_category.id, @tutorial) which seems to lead to the edit page. However I now have an issue on this page, as the form as it was ( % form_for(@tutorial) do |f| % ) gives the error: undefined

[Rails] Re: uniqueness validation perplexity

2009-09-26 Thread Dudebot
Oh, I definitely admit that my docs reading skills are imperfect! Maybe in my next life I'll be granted the get-it-all-at-once-when- reading gift, but not in this one :) Anyway, you helped me cut out unnecessary code and I learned quite a bit in the process, so I am grateful. On Sep 26, 8:22 

[Rails] Cross Model Validation

2009-09-26 Thread nb
So I have this question: Suppose I have these 3 models: class Company ActiveRecord::Base has_many :departments has_many :employees end class Department ActiveRecord::Base has_many :employees belongs_to :company end class Employee ActiveRecord::Base belongs_to :company

[Rails] Re: cms like routes

2009-09-26 Thread fredd
I think I solved it my self actually! It turns out that if you name the id parameter something else (like article_id) Rails actually divides the params correctly. So this route: map.article_by_id '*sections/:article_id', :controller = articles, :action = show, :article_id = /\d|\d-(.+)/ would

[Rails] SSL/HTTP with regards to Mongrel

2009-09-26 Thread Tom Milewski
I have been looking all over and either I can't find anything or I can't find anything that works... so here I am. How can I go about setting up SSL/HTTP with regards to Mongrel? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: dynamic form problem

2009-09-26 Thread Marnen Laibow-Koser
Greg Donald wrote: On Fri, Sep 25, 2009 at 4:37 PM, Jedrin jrubia...@gmail.com wrote: try. Having empty tr td tags in the Empty tags is invalid HTML. No it's not. Check with the W3C validator. It has no problem with tabletrtd/td/tr/table Use a non-breaking space nbsp; or something

[Rails] Paperclip with external url and asset_host?

2009-09-26 Thread James West
Hi, I'm trying to get Paperclip to work with asset_host and have totally failed to do so. The idea is to use asset_host to specify the url that I want to use for my image hosting (www.unlimitedwebhosting.co.uk) so that link helpers will use the image host location instead of the local file

[Rails] Re: Cheapest Rails Hosting where they give you full access to Apache (to load modules etc)???

2009-09-26 Thread James West
Greg Hauptmann wrote: any pointers / suggestions re cheapest Rails hosting where they give you full access to Apache (to load modules etc)??? Can be a shared platform, however not sure if there is a shared platform type hosting service where they do give you such access? Having tried a lot

[Rails] Re: removing attribute prefix from validation error messages

2009-09-26 Thread richardun
Actually, bgumbiker, I just posted this answer yesterday so a bit more searching might have produced an answer.

[Rails] Does create a new record?

2009-09-26 Thread Fernando Perez
Search engine don't index so it's hard to find info about it. Let's say I have: order = order.create item = Item.new Will order.items item create a new entry for the item in DB or not? I'm having issues. -- Posted via http://www.ruby-forum.com/.

[Rails] To protect or not email attribute of user

2009-09-26 Thread Fernando Perez
Hi, What's your best practice about the email attribute of a registered user in your DB. I don't want people to be able to change email. But what's best? 1) protect the email attribute with attr_protected or attr_accessible and suffer the pain of having to do user.email = everywhere in

[Rails] Re: cost model for a RoR where users could upload lots of file? what approach?

2009-09-26 Thread James West
Greg Hauptmann wrote: Hi, Any ideas/suggestions re what a good cost model / approach would be if one's Ruby on Rails application was to be successful, but noting users (as part of the service/application) could upload lots of files (images etc). What's a good way of have: (a) a

[Rails] Re: Does create a new record?

2009-09-26 Thread David A. Black
Hi -- On Sat, 26 Sep 2009, Fernando Perez wrote: Search engine don't index so it's hard to find info about it. Let's say I have: order = order.create item = Item.new Will order.items item create a new entry for the item in DB or not? I'm having issues. Yes, it will save the item

[Rails] Re: Does create a new record?

2009-09-26 Thread Fernando Perez
Yes, it will save the item (assuming Order has many Items, Item belongs to Order). If it doesn't, something else is wrong (like the item not being valid). Nice catch, one of my items was not valid. -- Posted via http://www.ruby-forum.com/.

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

2009-09-26 Thread louposk
@Litwin: if i specify the gems in the environment.rb file, when i transfer the application and run gems:install all these gems will install automatically to the machine?? Thanx @xiexie11: i dont want only to see the gems used from the app, i want to know how to make them available when i

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

2009-09-26 Thread Fernando Perez
@xiexie11: i dont want only to see the gems used from the app, i want to know how to make them available when i transfer the app to another computer Thanx If one of your gem is compiled, then you'll run in troubles if the target computer is not the same as the source computer. -- Posted

[Rails] Re: I'm restarting to work with ruby on rails, but having configurations problems

2009-09-26 Thread Katherine
I do not follow that book although it is updated for Rails 2.0. Make sure you have map.resources :stories on routes,rb On Sep 26, 1:29 pm, Delirium tremens pedbe...@gmail.com wrote: I have the Shovell source code from the book Simply Rails 2, but I'm having problems running it. preGetting

[Rails] Running Unit Tests With SphinxSE

2009-09-26 Thread MaggotChild
Several of my unit tests run queries against SphinxSE. Since Rails creates the test DB by dumping the dev DB schema, my SphinxSE queries aren't run against the test DB. There seems to be no way to hook into the test:clone_structure task, so I thought that I'll just have the appropriate unit

[Rails] What are methods ending in =?

2009-09-26 Thread Greg Christopher
Hi, I was wondering what methods ending in an equal sign meant, but am not sure what to search for? Could anyone point me to any resources or tell me some terms to search for. Thanks! -Greg -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] Re: What are methods ending in =?

2009-09-26 Thread Fernando Perez
Greg Christopher wrote: Hi, I was wondering what methods ending in an equal sign meant, but am not sure what to search for? Could anyone point me to any resources or tell me some terms to search for. Thanks! -Greg It's sugar syntax! So the method assign=(user_id), can be written in

[Rails] Re: removing attribute prefix from validation error messages

2009-09-26 Thread bgumbiker
THanks Richard, Could you post any further usage example as I am quite new in Ruby and Rails and do not understand what happening below in your code. Is :msg an attribute in the model? thanks, bogumbiker On Sep 26, 11:20 pm, richardun richar...@gmail.com wrote: Actually, bgumbiker, I just

[Rails] Cleaning up test files for Paperclipped models

2009-09-26 Thread Fernando Perez
In my tests that use Paperclip some require that a file is provided, the problem is that in the test, when the object gets saved to DB, the associated file gets saved to disk and clutters my folders. So what's the solution for that? The problem is the has_attached_file method. -- Posted via

[Rails] Re: Config XLSUITE in Windows

2009-09-26 Thread hsandjaja
Hmm... I've never seen anything like that when booting up my XLsuite. That is very weird. Did you solve this problem? I don't think it's a problem related to XLsuite app though. Can you boot up other Rails application just fine? Your Rails version shouldn't matter since XLsuite has rails under

[Rails] Re: Config XLSUITE in Windows

2009-09-26 Thread Harman Sandjaja
Hello, Not sure if this is going to be a double post. Anyway... did you manage to solve this problem? I can start XLsuite application on my Windows machine just fine. Looking at the trace though, I don't think it's related to XLsuite app. Can you boot up other Rails application just fine

[Rails] Use the source, dude (was: uniqueness validation perplexity)

2009-09-26 Thread Michael Schuerig
On Saturday 26 September 2009, Dudebot wrote: Oh, I definitely admit that my docs reading skills are imperfect! Maybe in my next life I'll be granted the get-it-all-at-once-when- reading gift, but not in this one :) Anyway, you helped me cut out unnecessary code and I learned quite a bit in

[Rails] Re: Use the source, dude (was: uniqueness validation perplex

2009-09-26 Thread Marnen Laibow-Koser
Michael Schuerig wrote: On Saturday 26 September 2009, Dudebot wrote: Oh, I definitely admit that my docs reading skills are imperfect! Maybe in my next life I'll be granted the get-it-all-at-once-when- reading gift, but not in this one :) Anyway, you helped me cut out unnecessary code and

[Rails] Re: SSL/HTTP with regards to Mongrel

2009-09-26 Thread Wang Pengcheng
This is my solution. Nginx + Mongrel Nginx can support the Https. http://wiki.nginx.org/NginxHttpSslModule Let nginx parser the Https request and then proxy it to Mongrel. 2009/9/27 Tom Milewski tmilew...@gmail.com I have been looking all over and either I can't find anything or I can't

[Rails] Re: What are methods ending in =?

2009-09-26 Thread Colin Curtin
On Sat, Sep 26, 2009 at 8:38 PM, Mario Gr rails-mailing-l...@andreas-s.net wrote: Got it - maybe.  I found a good resource[1], but I am not sure I understand the value of the setter method in the first place. It would seem that benefit is being able to skip explicitly calling save on an

[Rails] Re: What are methods ending in =?

2009-09-26 Thread Colin Curtin
On Sat, Sep 26, 2009 at 9:31 PM, Colin Curtin colin.t.cur...@gmail.com wrote: in reference to your first question - I was wondering what methods Er, I mean, if that was you also. I forgot to check the original poster's name. :D Colin --~--~-~--~~~---~--~~ You

[Rails] Re: Heroku

2009-09-26 Thread s.ross
On Sep 26, 2009, at 3:56 AM, Nicolai Constantin Reuschling wrote: So you are really asking the Rails mailing list for help with a tool interfacing with a service provider? Nicolai I think the OP asked a fair question. People ask about deploying on Dreamhost or [insert host name here]

[Rails] Re: What are methods ending in =?

2009-09-26 Thread Greg Christopher
Yeah, i was using my buddy's computer. So, I think I understand, but want to make sure I understand how I would use these practically. Basically, using these ruby shortcuts allows me to better work with and manage variables that I won't immediately be saving with my object. For instance, in