Re: [Rails] MySql2 adapter hangs in Rails3 on Windows XP

2011-06-09 Thread Dhruva Sagar
xxuser password: xxpwd host: xxx_dev.devhost.com port: 3306 I have reconfigured this for a db local on my PC and for a remotes db- server. Both of those databases respond normally to commandline mysql monitor and to MySql Workbench. The tests with sqlite3 databases work fine. -- Thank

Re: [Rails] undefined method `task' for #

2011-06-07 Thread Dhruva Sagar
gt; 1.2) >term-ansicolor (1.0.5) >thin (1.2.11) > daemons (>= 1.0.9) > eventmachine (>= 0.12.6) > rack (>= 1.0.0) > > PLATFORMS > ruby > > DEPENDENCIES > RedCloth (>= 4.0) > annotate > cells (= 3.3.5) > crypt >

Re: [Rails] installed rails 2.3.9 but keep getting rails 2.3.2

2010-12-24 Thread Dhruva Sagar
Hi, Are you using bundler ? If so please do check bundle show rails on your root and check which version is being used. -- Thanks & Regards, Dhruva Sagar <http://dhruvasagar.net>. On Fri, Dec 24, 2010 at 16:19, Colin Law wrote: > On 24 December 2010 08:23, ct9a wrote

Re: [Rails] rubyzip install error

2010-12-21 Thread Dhruva Sagar
command like gem install rubyzip. If for some reason you wish to install the latest from source, I would suggest you to contact the developer or check the source directly... -- Thanks & Regards, Dhruva Sagar. On Tue, Dec 21, 2010 at 16:33, Reza Adinata wrote: > Hi, > > I am trying

Re: [Rails] no Ruby script found in input (LoadError)

2010-12-10 Thread Dhruva Sagar
#x27;t help you, perhaps you should try and give us more details, perhaps the complete stack trace. -- Thanks & Regards, Dhruva Sagar. On Sat, Dec 11, 2010 at 05:26, Jo Bdsgh wrote: > I just cloned a new Raills 3 project from git. The project is brand > new, although it does have som

Re: [Rails] Re: multiple domain names mapping to different rails app URLs

2010-10-26 Thread Dhruva Sagar
Oh well if that is the case then you can probably check the current domain / request.url in a before_filter inside application_controller and work accordingly thereafter, that should be simple enough too... -- Thanks & Regards, Dhruva Sagar. On Tue, Oct 26, 2010 at 12:32, bingo bob w

Re: [Rails] Re: multiple domain names mapping to different rails app URLs

2010-10-25 Thread Dhruva Sagar
I think you should run different rail apps on different ports and use Nginx to proxy to them. That should be simple enough. -- Thanks & Regards, Dhruva Sagar. On Tue, Oct 26, 2010 at 11:57, bingo bob wrote: > Now I'm firmly back in the rails world here, any kind soul give me a

Re: [Rails] nginx deployment

2010-10-25 Thread Dhruva Sagar
Hi, As you can see, the second server to listen on 3000 has been given the server_name localhost. Nginx is ignoring that config since it can't listen on the same port twice. -- Thanks & Regards, Dhruva Sagar. On Tue, Oct 26, 2010 at 11:38, Dhruva Sagar wrote: > Hi, > > You

Re: [Rails] nginx deployment

2010-10-25 Thread Dhruva Sagar
Hi, You have 2 servers to listen on the port 3000 in the config, thats the problem imo -- Thanks & Regards, Dhruva Sagar. On Tue, Oct 26, 2010 at 11:35, Tushar Gandhi wrote: > Hi, > I have deployed my rails application using nginx module. > It is running successfully but

Re: [Rails] Re: Ahhh .count!

2010-05-10 Thread Dhruva Sagar
k" group. > To post to this group, send email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >

Re: [Rails] Run query on IRB

2010-05-04 Thread Dhruva Sagar
ing: unicode > database: rubyPostgre_test > pool: 5 > username: rubyPostgre > password: > > production: > adapter: postgresql > encoding: unicode > database: rubyPostgre_production > pool: 5 > username: rubyPostgre > password: > > And my query it

Re: [Rails] Run query on IRB

2010-05-04 Thread Dhruva Sagar
cr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- Thanks & Regards, Dhruva Sagar. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&quo

Re: [Rails] Re: Multiple Joins to a single table

2010-04-28 Thread Dhruva Sagar
a 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 email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > r

Re: [Rails] Use of :: operator

2010-04-27 Thread Dhruva Sagar
t; "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/

Re: [Rails] Re: Re: Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Hope it worked :). On Wed, Apr 28, 2010 at 05:43, Ben Woodcroft wrote: > Dhruva Sagar wrote: > > Sorry it should be : > > > > Deck.all(:joins => 'inner join cards c1 on c1.deck_id=decks.id > > <http://d.id> inner > > join cards c2 on c2.deck_id=d

Re: [Rails] Re: Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Sorry it should be : Deck.all(:joins => 'inner join cards c1 on c1.deck_id=decks.id <http://d.id> inner join cards c2 on c2.deck_id=decks.id <http://d.id>', :conditions => ["c1.rank = 'Ace' AND c2.rank = 'King']) On Tue, Apr 27, 2010 at 19:14

Re: [Rails] Re: Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
r 27, 2010 at 19:14, Ben Woodcroft wrote: > Dhruva Sagar wrote: > > Hi, > > > > Can't your sql be : > > > > select * from decks d > > inner join cards c1 on c1.deck_id=d.id > > where > > c1.rank = 'Ace' and > > c1.rank = 'King

Re: [Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
ubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- Thanks & Regards, Dhruva Sagar. -- You received this message because you a

Re: [Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Hi, I think I misunderstood your email subject that you wanted to do multiple joins from activerecord with a single table, so I quickly pasted the code to do so :). Sharagoz's answer looks right. On Tue, Apr 27, 2010 at 18:12, Ben Woodcroft wrote: > Dhruva Sagar wrote: > > Yes,

Re: [Rails] Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
is group, send email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- Thanks & Regards, Dh

Re: [Rails] Re: Re: Rails I18n

2010-04-26 Thread Dhruva Sagar
on Rails: Talk" group. > To post to this group, send email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/rub

Re: [Rails] action_mailer - No Errors, but no emails sent

2010-04-26 Thread Dhruva Sagar
ause you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com > . > For more options

Re: [Rails] Re: Re: Rails I18n

2010-04-26 Thread Dhruva Sagar
overkill, how do you map a single model to different table based on the locale ? On Mon, Apr 26, 2010 at 21:53, Colin Law wrote: > On 26 April 2010 13:55, Dhruva Sagar wrote: > >... > > > > eg.) Lets say I have a User model and each user has a 'role' as

Re: [Rails] Re: Re: Rails I18n

2010-04-26 Thread Dhruva Sagar
On Mon, Apr 26, 2010 at 17:58, Marnen Laibow-Koser wrote: > Dhruva Sagar wrote: > > Thanks & Regards, > > Dhruva Sagar. > > > > > > > > On Mon, Apr 26, 2010 at 17:39, Marnen Laibow-Koser > > wrote: > > > >> Dhruva Sagar wrote: > &

Re: [Rails] Re: Rails I18n

2010-04-26 Thread Dhruva Sagar
Thanks & Regards, Dhruva Sagar. On Mon, Apr 26, 2010 at 17:39, Marnen Laibow-Koser wrote: > Dhruva Sagar wrote: > > Yes it is better to store the multilanguage strings in the .yml files. > > Why you ask, well are you going to have all your record entries repeat > >

Re: [Rails] Rails I18n

2010-04-26 Thread Dhruva Sagar
e app. Thanks & Regards, Dhruva Sagar. On Mon, Apr 26, 2010 at 15:17, Yiannis wrote: > I was just wondering about locales and .yml files. Is it better to > store the multilanguage strings in .yml files than in databases? And > if yes, why? > > I was also wondering how rail

Re: [Rails] exception handling

2010-04-26 Thread Dhruva Sagar
Well you can specify a default page / controller action to perform for unmatched routes as well...so if the route doesn't exist it shows a much user friendly page instead of the rails error message Thanks & Regards, Dhruva Sagar. On Mon, Apr 26, 2010 at 13:52, Tom Mac wrote: >

Re: [Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-23 Thread Dhruva Sagar
I support VIM / GVIM all the way Thanks & Regards, Dhruva Sagar. On Fri, Apr 23, 2010 at 17:47, Marnen Laibow-Koser wrote: > tonypm wrote: > > Interesting that no one hs yet mentioned emacs. > > Ah, good point. Emacs is my favorite console editor, but I'm not al

Re: [Rails] Re: Newbie regular expression question..

2010-04-07 Thread Dhruva Sagar
The question or the example isn't clear enough. But for the example you gave, this works = a.sub(/[\s\_]/,'') Thanks & Regards, Dhruva Sagar. On Wed, Apr 7, 2010 at 15:25, Hemant Bhargava wrote: > Siddick Ebramsha wrote: > > Give sample input string and output

Re: [Rails] wwwwwwwwwwwwwwwwwwww

2010-01-12 Thread Dhruva Sagar
that was a good 1 :) Thanks & Regards, Dhruva Sagar. On Tue, Jan 12, 2010 at 9:01 PM, Colin Law wrote: > 2010/1/12 : > > ww > > I presume you have a typing impediment. We always try our best to > help those with disabilities, relax and try agai

Re: [Rails] create subform within rails form

2010-01-02 Thread Dhruva Sagar
ative positioning however. Second in my scenario I felt best to have AJAX forms for the creation purpose so that I can create the object without having to leave the main form, you should consider something similar. Beyond that it depends on your exact scenario that you wish to create. Thanks & Regard

Re: [Rails] Re: persisting input values not tied to an object in form

2009-12-23 Thread Dhruva Sagar
Happens sometimes, glad it helped :) Thanks & Regards, Dhruva Sagar. On Thu, Dec 24, 2009 at 12:41 PM, nisha wrote: > Gr8!! Thanks a bunch. it solved my problem :) how cudn't i think of > this simple solution... > > > > On Dec 23, 3:16 pm, Dhruva Sagar wrote:

Re: [Rails] NoMethodError

2009-12-23 Thread Dhruva Sagar
>From the logs what appears to me is that you don't have any 'title' field in the book database. Thanks & Regards, Dhruva Sagar. On Thu, Dec 24, 2009 at 12:36 PM, dwhitekiss wrote: > Hi, > > In a few words, can someone explain to me the NoMethodError. Googlin

Re: [Rails] persisting input values not tied to an object in form

2009-12-23 Thread Dhruva Sagar
feed this to the field. Same thing goes for other non-model fields. Thanks & Regards, Dhruva Sagar. On Wed, Dec 23, 2009 at 3:41 PM, nisha wrote: > Hi all. > > I have a form with multiple models and there are certain input fields > that are not tied to any model. Now when this

Re: [Rails] how to send mail through ruby on rails

2009-12-08 Thread Dhruva Sagar
should google for ActionMailer. Thanks & Regards, Dhruva Sagar. On Wed, Dec 9, 2009 at 11:32 AM, INDRANIL MUKHERJEE < indranil.sinc...@gmail.com> wrote: > Plz tell me the code to send mail from ruby on rails.I have googled > many times but couldn't find a proper sol

Re: [Rails] Re: root_path and root_url undefined

2009-12-06 Thread Dhruva Sagar
I use *redirect_to root_url* Thanks & Regards, Dhruva Sagar. On Sun, Dec 6, 2009 at 10:05 PM, Matt Harrison wrote: > On Sun, Dec 06, 2009 at 08:05:22AM -0800, Rick wrote: > > I think you must have something in your code (plugin perhaps?) that is > > mucking with the

Re: [Rails] Problem installing RoR Ubuntu 9.04

2009-12-06 Thread Dhruva Sagar
Hi, Follow this tutorial. https://help.ubuntu.com/community/RubyOnRails Thanks & Regards, Dhruva Sagar. On Sun, Dec 6, 2009 at 9:34 PM, LuisRuby wrote: > Dear friends, > I installed RoR using the "Agile Web Development with Rails, 3rd > edition" recipe in my Ubuntu 9

Re: [Rails] ActionMailer dont function with JRuby?

2009-12-04 Thread Dhruva Sagar
re clarity on the same. Thanks & Regards, Dhruva Sagar. On Sat, Dec 5, 2009 at 8:35 AM, Paulo Coutinho wrote: > Thx for response. > > But im already have this file "smtp_tls.rb", im using a plugin called: > "action_mailer_optional_tls" > > With normal

Re: [Rails] ActionMailer dont function with JRuby?

2009-12-04 Thread Dhruva Sagar
oes_here',* *:ssl=> true* *}* These are my configurations Thanks & Regards, Dhruva Sagar. On Sat, Dec 5, 2009 at 8:20 AM, Paulo Coutinho wrote: > Im using the normal configuration in "/config/environment.rb": > > # ConfiguraĆ§Ć£o do smtp > ActionM

Re: [Rails] ActionMailer dont function with JRuby?

2009-12-04 Thread Dhruva Sagar
& Regards, Dhruva Sagar. On Sat, Dec 5, 2009 at 8:14 AM, Paulo Coutinho wrote: > I have application that i send email normal with native ruby. > > But when i execute the sample application with jruby, it dont send email > and dont get error. > > What can be wrong? &

Re: [Rails] Need help debugging syntax error from Agile Web Development, 3RD Edition

2009-12-04 Thread Dhruva Sagar
IF, JPG' + 'or PNG image' protected def price_must_be_at_least_a_cent errors.add(:price, 'should be at least 0.01') if price.nil? || price < 0.01 end end Thanks & Regards, Dhruva Sagar. On Fri, Dec 4, 2009 at 1:28 PM, pauld wrote: > Hi-- > > I

Re: [Rails] How to show two models output in one page

2009-12-03 Thread Dhruva Sagar
NDEX action you could have something like this in the index action of the POST controller : def index @posts = Post.all @videos = Video.all end and in the view you can then loop through these 2 models and display their content as you like... Thanks & Regards, Dhruva Sagar. On Fr

Re: [Rails] How to show two models output in one page

2009-12-03 Thread Dhruva Sagar
There are numerous ways you could achieve it. Can you give more details for your particular needs ? Are the two models related ? Thanks & Regards, Dhruva Sagar. On Fri, Dec 4, 2009 at 11:12 AM, suji A wrote: > Hi, > > I have two models post and video. How to combine their out

Re: [Rails] Directory creation from Ruby

2009-12-03 Thread Dhruva Sagar
You need to put that system call in the controller action which receives this form submission! Where then you could do something like this : system('mkdir var/www/html/' + params[:model][:name]); Also it is not advisable to hard code the entire path. Thanks & Regards, Dhruva Sag

Re: [Rails] Simple IF Statement help please

2009-12-03 Thread Dhruva Sagar
output 00:00:00 appropriately when it is that. Thanks & Regards, Dhruva Sagar. On Thu, Dec 3, 2009 at 4:30 PM, Terry6004 wrote: > > > > Terry6004 wrote: > > > > Hi Mr Sagar, > > > > I ran that query in my console and it returned an array o

Re: [Rails] Simple IF Statement help please

2009-12-03 Thread Dhruva Sagar
BTW %H:%M:%S should show 00:00:00 time as well if that is what it is since %H is for 24 hour time and so on. Thanks & Regards, Dhruva Sagar. On Thu, Dec 3, 2009 at 3:26 PM, Terry6004 wrote: > > Hi Mr Sagar, > > Yesterday i tried the code you helped me with which was

Re: [Rails] Simple IF Statement help please

2009-12-03 Thread Dhruva Sagar
t; ["time >= ? AND weekday = ?", *Time.now.strftime('%H:%M;%S')*, Date::DAYNAMES[Date.today.wday]]) So that the comparison is made appropriately in the SQL. Thanks & Regards, Dhruva Sagar. On Thu, Dec 3, 2009 at 3:26 PM, Terry6004 wrote: > > Hi Mr Sagar, > > Yester

Re: [Rails] Simple IF Statement help please

2009-12-03 Thread Dhruva Sagar
Hi, The following code seems to be more accurate to achieve what you want to do. Station: <% if @train_time.station == "NMC" %> By New Mills Central <% else %> By New Mills Newtown <% end %> Thanks & Regards, Dhruva Sag

Re: [Rails] What if statements help with dates

2009-12-02 Thread Dhruva Sagar
te.today.wday]]) If it still gives you the same error, please look at the logs and check the SQL query running in the background, if it's returning no records see what's wrong in the query / database. Thanks & Regards, Dhruva Sagar. On Wed, Dec 2, 2009 at 3:26 PM, Terry6004 wrot

Re: [Rails] What if statements help with dates

2009-12-02 Thread Dhruva Sagar
elps. Thanks & Regards, Dhruva Sagar. On Wed, Dec 2, 2009 at 3:01 PM, Terry6004 wrote: > > Hi all, I am a newbie and just recently started to create apps with ruby on > rails so please go easy on me :) > > I have an app which has a database in mysql which is called bus_t

Re: [Rails] root_path and root_url undefined

2009-12-02 Thread Dhruva Sagar
Are you sure you restarted your server after introducing the map.root mapping ? Thanks & Regards, Dhruva Sagar. On Wed, Dec 2, 2009 at 2:13 PM, Matt Harrison wrote: > Darian Shimy wrote: > > Not sure what is the issue is, I am running 2.3.4 and it works fine. > > I do have

Re: [Rails] Re: will_paginate don't work on jruby platform

2009-11-25 Thread Dhruva Sagar
Alternatively I would also recommend you to try and do the same on the script/console and see if the paginate method is returning what you intend to return. Thanks & Regards, Dhruva Sagar. 2009/11/26 femto > Yes, the paginate find method in controller works.(Model.paginate blah >

Re: [Rails] Re: will_paginate don't work on jruby platform

2009-11-25 Thread Dhruva Sagar
Well then are you sure that the query (conditions etc) that your running on the paginate method should infact return results ? Check the logs and see the query running in the background and see if that query does return some records in the @collection. Thanks & Regards, Dhruva Sagar. 200

Re: [Rails] will_paginate don't work on jruby platform

2009-11-25 Thread Dhruva Sagar
are you sure you have installed the GEM ? Thanks & Regards, Dhruva Sagar. On Thu, Nov 26, 2009 at 8:54 AM, femto wrote: > Hello all,will_paginate don't work on jruby platform, > the Model.paginate find works ok, accepts all kinds of params, > this is config.gem > conf

[Rails] Re: Renaming a model and table leads to SQL Exception

2009-11-09 Thread Dhruva Sagar
I think you missed to reset your database using rake db:reset after having changed the model name & the corresponding migrations. Thanks & Regards, Dhruva Sagar. On Tue, Nov 10, 2009 at 9:01 AM, Lady Hawk wrote: > > I have a model called "Media", database table &

[Rails] Re: Mysql::Error: query: not connected

2009-11-03 Thread Dhruva Sagar
I will be able to get more information in some 3 more hours when I will be in office where I experienced this error Thanks & Regards, Dhruva Sagar. Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> - "May you live every day of your life."

[Rails] Re: Rails in css ..

2009-11-02 Thread Dhruva Sagar
That should actually work. Are you sure @var has some value ? Thanks & Regards, Dhruva Sagar. Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html> - "I, Joan Crawford, I believe in the dollar. Everything I earn, I spend." On Tue, Nov 3, 2009

[Rails] Re: Advice to setup a rails development box

2009-10-26 Thread Dhruva Sagar
I am not sure which linux is best for rails. But my personal opinion is that Ubuntu rocks! I have surely never had a problem I couldn't solve :) in the last 4 years. Thanks & Regards, Dhruva Sagar. Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html> - &qu

[Rails] Re: Select statements do not work on MySQL

2009-10-14 Thread Dhruva Sagar
something then you might need to contact your hosting support. This doesn't seem to be a problem from rails side in my knowledge. Thanks & Regards, Dhruva Sagar. Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html> - "If God had wanted man to play soc

[Rails] Re: Select statements do not work on MySQL

2009-10-14 Thread Dhruva Sagar
Perhaps you should look up at the database user priviledges that you have. Thanks & Regards, Dhruva Sagar. Marie von Ebner-Eschenbach<http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html> - "Even a stopped clock is right twice a day." On Wed, Oct 14, 20

[Rails] Re: regular expression help needed

2009-09-11 Thread Dhruva Sagar
If you need RegExp help this would help you : s = 'Bangalore.txt' regexp = /(.*)\.(/*)/ regexp.match(s) baseName = $1 # = "Bangalore" But I must say, you should try google a bit more often as Abhinav mentioned. Thanks & Regards, Dhruva Sagar. Ted Turner <http:/

[Rails] Re: regular expression help needed

2009-09-11 Thread Dhruva Sagar
reg = /(.*)\s([0-9]\s.*)/ s = " IANS 3 September 2009, 02:57pm IST " reg.match(s) location = $1.strip # = "IANS" plain_content = $2.strip # = "3 September 2009, 02:57pm IST" Thanks & Regards, Dhruva Sagar. Ogden Nash <http://www.brainyquote.com/quotes/autho

[Rails] Re: regular expression help needed

2009-09-11 Thread Dhruva Sagar
Well for the example string you have given, this does the job : reg = /(.*):\s+(.*)/ s = "HYDERABAD/NEW DELHI: Andhra Pradesh chief minister was " reg.match(s) location = $1 # = "HYDERABAD/NEW DELHI" plain_content = $2 # = "Andhra Pradesh chief minister was &q

[Rails] Re: Having some trouble with loop in a form

2009-09-07 Thread Dhruva Sagar
Your submit button is within the @items.each loop, hence I see that for each row there is an 'Add Item' button.There should be only 1 submit button in the end (if you want to submit the entire form) Thanks & Regards, Dhruva Sagar. Joan Crawford<http://www.brainyquote.com

[Rails] Re: will_paginate problem

2009-09-01 Thread Dhruva Sagar
Your welcome, glad it helped :). Thanks & Regards, Dhruva Sagar. Charles de Gaulle<http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html> - "The better I get to know men, the more I find myself loving dogs." On Wed, Sep 2, 2009 at 9:36 AM, fireflyman wrote:

[Rails] Re: will_paginate problem

2009-09-01 Thread Dhruva Sagar
In the statement, it should be :order => 'id' and not :order => :id Thanks & Regards, Dhruva Sagar. Marie von Ebner-Eschenbach<http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html> - "Even a stopped clock is right twice a day." On Wed

[Rails] Re: will_paginate problem

2009-09-01 Thread Dhruva Sagar
e page links you will need : <%= will_paginate @books %> Please try the one I have mentioned above, this should work properly earlier I had misspelled paginate to paginage :-S. Sorry for those typos. Thanks & Regards, Dhruva Sagar. Mike Ditka <http://www.brainyquote.com/quotes/

[Rails] Re: will_paginate problem

2009-09-01 Thread Dhruva Sagar
One thing that I forgot is that you will need to add the following to your view to create the page links <%= will_paginate @books %> Thanks & Regards, Dhruva Sagar. Stephen Leacock<http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html> - "I detest life-insuranc

[Rails] Re: will_paginate problem

2009-09-01 Thread Dhruva Sagar
Oh, thanks for pointing that out Adam, There is indeed a spellings mistake, it must be params[:page] Thanks & Regards, Dhruva Sagar. Marie von Ebner-Eschenbach<http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html> - "Even a stopped clock is right twice a day

[Rails] Re: will_paginate problem

2009-09-01 Thread Dhruva Sagar
ts.com episode 51, it demonstrates what you wish to do quite well. Thanks & Regards, Dhruva Sagar. Ted Turner <http://www.brainyquote.com/quotes/authors/t/ted_turner.html> - "Sports is like a war without the killing." On Wed, Sep 2, 2009 at 7:48 AM, fireflyman wrote: &

[Rails] Re: has HAML gone "mainstream"?

2009-08-31 Thread Dhruva Sagar
ying my application to my web hosting, which was giving the error for any of rake operations saying !rake aborted invalid file -- haml [almost like this] Thanks & Regards, Dhruva Sagar. Samuel Goldwyn<http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html> - "I'm wil

[Rails] Re: rake file created not recognized by rake -T

2009-08-31 Thread Dhruva Sagar
Thanks & Regards, Dhruva Sagar. Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html> - "I, Joan Crawford, I believe in the dollar. Everything I earn, I spend." On Tue, Sep 1, 2009 at 4:59 AM, Bryan wrote: > > Kevin, > > > /lib/tasks

[Rails] Re: Rake migration issue

2009-08-31 Thread Dhruva Sagar
You can try to do a 'rake db:drop' to drop all tables, then do a 'rake db:create' and then finally again do 'rake db:migrate' Regarding the error in your second rake file, can you please share the migration code within that file ? Thanks & Regards,

[Rails] Re: Migration - wrong SQL statement is created

2009-08-31 Thread Dhruva Sagar
ID is a special field in rails, the migrations generate the ID field automatically, you don't need to declare it within the migration. Thanks & Regards, Dhruva Sagar. Pablo Picasso<http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html> - "Computers are useless. Th

[Rails] Re: rake file created not recognized by rake -T

2009-08-30 Thread Dhruva Sagar
in /lib/tasks when you do a rake -T , it will show you your custom rake tasks in the following way : rake tasks:one and that is how you need to call it to execute the rake task as well. I hope that helps. Thanks & Regards, Dhruva Sagar. Marie von Ebner-Eschenbach<http://www.br

[Rails] Rails Deployment

2009-08-30 Thread Dhruva Sagar
Hi, How do I configure my rails app for a custom gems directory ? My hosting tells me that I need to add this to my scripts : $:.push("/home/concptpl/ruby/gems") But that seems to be for independent ruby scripts, how to I configure rails accordingly ? Thanks & Regards, Dhruva

[Rails] HAML problem on hosting

2009-08-30 Thread Dhruva Sagar
haml'. Does anybody have any ideas on what's wrong ? Any suggestions I could try ? Thanks & Regards, Dhruva Sagar. Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html> - "I, Joan Crawford, I beli

[Rails] Re: Help with Select

2009-08-29 Thread Dhruva Sagar
I would like to tell you one small thing. You don't need :selected in any of the val() calls. for a select box, the val() method is wise enough to return the selected value. Thanks & Regards, Dhruva Sagar. Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html

[Rails] Re: Objects in Views

2009-08-29 Thread Dhruva Sagar
That's interesting, again thank you very much for you help. I too think that your idea is better :) Thanks & Regards, Dhruva Sagar. Samuel Goldwyn<http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html> - "I'm willing to admit that I may not always be right, b

[Rails] Re: Help with Select

2009-08-29 Thread Dhruva Sagar
Hey can you please use some service like pastie.org to paste the code and give us the link ? Reading this code gives me a headache ... Thanks & Regards, Dhruva Sagar. Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> - "May you live every day of your

[Rails] Re: Objects in Views

2009-08-29 Thread Dhruva Sagar
On Sat, Aug 29, 2009 at 1:21 PM, Colin Law wrote: > > 2009/8/29 Dhruva Sagar : > > Hi everyone, > > > > I have recently experienced a strange behavior (strange from my > knowledge) > > in rails. > > > > In my controllers 'new' action, I am

[Rails] Objects in Views

2009-08-28 Thread Dhruva Sagar
flow fully, I want to know why the above mentioned error occurs*. work around in 'new' view : if @controllerModel.errors @model1 = Model1.all @model2 = Model2.all end Thanks & Regards, Dhruva Sagar. Stephen Leacock<http://www.brainyquote.com/quotes/authors/s/stephe

[Rails] Question regarding routing

2009-08-26 Thread Dhruva Sagar
tion I would use this : new_controller_path So what I want to know is if there is such a dynamic variable that I can use for the additional function that I declared, or do I always have to hard code it using a string ? Thanks & Regards, Dhruva Sagar. Marie von Ebner-Eschenbach<http://www.brai

[Rails] Re: Anything but Aptana

2009-08-26 Thread Dhruva Sagar
re able to find and customize the .vimrc file properly, you won't even have much of a learning curve... Thanks & Regards, Dhruva Sagar. Charles de Gaulle<http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html> - "The better I get to know men, the more I find mys

[Rails] Re: Anything but Aptana

2009-08-25 Thread Dhruva Sagar
1 more thing I forgot, snippetsEmu is another plugin you must sure have... Thanks & Regards, Dhruva Sagar. Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> - "May you live every day of your life." On Tue, Aug 25, 2009 at 8:28 PM, David

[Rails] Re: Anything but Aptana

2009-08-25 Thread Dhruva Sagar
Hi, I will suggest you to try gVim along with the plugin called rails.vim (to say the least, there are lots of other stuff as well you could try on your own) I can say with confidence it will change your life. Thanks & Regards, Dhruva Sagar. Pablo Picasso<http://www.brainyquote.com

[Rails] Re: Variables in URLs. Routes manipulation.

2009-08-25 Thread Dhruva Sagar
The links would work as you intend to as long as the routes are fine. Thanks & Regards, Dhruva Sagar. Stephen Leacock<http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html> - "I detest life-insurance agents: they always argue that I shall some day die, which is not so

[Rails] Re: Get name from table has many , belong to relationship

2009-08-25 Thread Dhruva Sagar
the id whereas the text of the options would be address.text assuming that text field is the field of address which holds the address string. Hope it helps. Thanks & Regards, Dhruva Sagar. Stephen Leacock<http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html> - "I det

[Rails] Re: uninitialized constant

2009-08-25 Thread Dhruva Sagar
Where is the class HelloMessageApi located ?You will need to include it inside the controller before being able to use it. Thanks & Regards, Dhruva Sagar. Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> - "May you live every day of your life.&q

[Rails] Re: Can't convert Symbol to string

2009-08-25 Thread Dhruva Sagar
>From the code you've pasted, :class_name => :teste seems to be the problemFrom what I know it should be :class => :teste assuming you have all the spellings correct. Thanks & Regards, Dhruva Sagar. Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html&g

[Rails] Re: overriding .blank? method

2009-08-25 Thread Dhruva Sagar
:-|, yea I did that anyways, did go through some stuff, will go through some more at night when I have more free time.Just wanted to get some good references or leads which others have already used perhaps ... Thanks & Regards, Dhruva Sagar. Charles de Gaulle<http://www.brainyquote.com

[Rails] Re: overriding .blank? method

2009-08-25 Thread Dhruva Sagar
Oh I am sorry for that, my mistake!!I wanted some info regarding monkey patching... Thanks & Regards, Dhruva Sagar. Ogden Nash <http://www.brainyquote.com/quotes/authors/o/ogden_nash.html> - "The trouble with a kitten is that when it grows up, it's always a cat." On

[Rails] Re: Autocomplete with DB + Urgent ..

2009-08-25 Thread Dhruva Sagar
s you could have a look at too. Thanks & Regards, Dhruva Sagar. Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html> - "If God had wanted man to play soccer, he wouldn't have given us arms." On Tue, Aug 25, 2009 at 11:55 AM, Hemant Bhargava < rails-

[Rails] Re: pluralize method

2009-08-25 Thread Dhruva Sagar
@Ar Chron exactly my thoughts, couldn't have been put better :D. Thanks & Regards, Dhruva Sagar. Charles de Gaulle<http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html> - "The better I get to know men, the more I find myself loving dogs." On Tue, Aug 25,

[Rails] Re: overriding .blank? method

2009-08-25 Thread Dhruva Sagar
could read something about it? Thanks! Thanks & Regards, Dhruva Sagar. Stephen Leacock<http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html> - "I detest life-insurance agents: they always argue that I shall some day die, which is not so." On Tue, Aug 25, 2009 at 5:

[Rails] Re: More routing problems

2009-08-25 Thread Dhruva Sagar
Hi Glen, When I wish to map a particular action apart from the standard one, I use the following route : map.resources :start, :collection => { :about=> :get } Perhaps that should help you. Thanks & Regards, Dhruva Sagar. Ogden Nash <http://www.brainyquote.com/quotes/authors/o/og