Statistics | Archive | Index
Search:

Log for #rubyonrails , beginning Friday, August 08 2008

[00:00:00] quit Cosmos95
[00:01:00] <context> so no one can help me :(
[00:01:00] quit keisukefukuda
[00:02:00] quit Dotmatrix
[00:02:00] quit moofbong
[00:03:00] <jtslade> Hey, If I use to_params, will my code that relies on .find(:id) fail?
[00:04:00] join Shpigford
[00:04:00] quit souldier
[00:05:00] join icenine457
[00:05:00] <Shpigford> Is there a way to exclude something from a route? For instance, something like: map.category '/tutorials/:category', :controller => "tutorials", :action => "show_category", :exclude => 'create'
[00:07:00] join e1mer
[00:08:00] join moofbong
[00:08:00] <context> dont define the create method in the controller and it will error
[00:09:00] quit funduk
[00:09:00] <Shpigford> I just need /tutorials/create to work with the create method but /tutorials/anything-else to use the show_category method
[00:09:00] quit NewMonarch
[00:09:00] <Shpigford> I need the create method in the controller
[00:10:00] quit Chadk
[00:12:00] nick
[00:12:00] join linoj
[00:12:00] <nice_burger> Shpigford: forget the :exclude bit. just have the route that will match 'tutorials/create' before 'tutorials/:category' in routes.rb
[00:12:00] join tawker3
[00:12:00] quit linoj
[00:12:00] quit nashk
[00:12:00] join saizai
[00:13:00] <nice_burger> see, i've been reading my obie, now i knows a lots
[00:13:00] <context> shpigford. what nice_burger said
[00:14:00] <nice_burger> context: fwiw, i think the POST requests to drupel sounds reasonable also, leave that poor db alone
[00:14:00] <Shpigford> Awesome. Thanks guys.
[00:15:00] <context> nice_burger. thats what im thinking
[00:16:00] join markyt_
[00:17:00] quit Shpigford
[00:17:00] quit lectrick_home
[00:18:00] quit lectrick
[00:20:00] join perezd88
[00:20:00] quit moofbong
[00:21:00] <context> THAT would be really nice
[00:21:00] <context> from the looks i might be able to do activeresource to drupal
[00:22:00] quit viewlogic
[00:24:00] <daeaglebeagl1> quick question
[00:24:00] <daeaglebeagl1> hey all
[00:24:00] join daeaglebeagl1
[00:24:00] <context> err nm
[00:25:00] <daeaglebeagl1> :message apparently only changes the last bit - "has been taken"
[00:25:00] <daeaglebeagl1> is there any way to change what the field name is in the error message?
[00:25:00] <daeaglebeagl1> I have a field that I'm doing a validates_uniqueness_of on
[00:26:00] nick
[00:27:00] join w3rd_
[00:27:00] quit Bray622
[00:29:00] join spaceG
[00:29:00] join rdavila
[00:31:00] join NewMonarch
[00:31:00] <context> ...
[00:31:00] <metusine> there should be a :message => 'your data is rubbish' sort of thing
[00:31:00] <metusine> daeaglebeagl1, did you look at the options you could pass into validates_uniqueness_of?
[00:32:00] <tiglionabbit> "no such file to load -- sqlite3/database" when I rake db:migrate. What's up with this?
[00:32:00] <daeaglebeagl1> alas alas
[00:32:00] <metusine> roll your own =)
[00:32:00] <impurist> in the thick of rails 2.1 upgrade ....
[00:32:00] <daeaglebeagl1> np, i'm probably going to monkeypathc
[00:32:00] join catalyst_media
[00:32:00] <metusine> then you need to do the unthinkable . . .
[00:32:00] <metusine> right
[00:32:00] <metusine> oh
[00:32:00] <metusine> hello =)
[00:32:00] <daeaglebeagl1> metusine: yes: like I said, it only changes the last bit.
[00:32:00] <impurist> greetings all :)
[00:33:00] <daeaglebeagl1> i'm off; take it easy all
[00:33:00] <tiglionabbit> Radar: I did, and found some weird command with no explanation of what it's supposed to do
[00:33:00] <daeaglebeagl1> metusine: thx anyway thx
[00:33:00] <Radar> tiglionabbit: google it
[00:34:00] <tiglionabbit> Radar: doesn't matter anyway because that find command doesn't find anything
[00:34:00] <metusine> very easy to customise if the built-in doesnt suit
[00:34:00] <metusine> daeaglebeagl1, there's not much too it
[00:34:00] <metusine> daeaglebeagl1, http://codesnippets.joyent.com/tag/error_messages_for
[00:34:00] <tiglionabbit> fixes permissions I guess
[00:34:00] quit markyt
[00:35:00] <Radar> tiglionabbit: bull. shit.
[00:35:00] join bear454
[00:35:00] <daeaglebeagl1> thx tho
[00:35:00] <daeaglebeagl1> i need a custom validation
[00:35:00] <daeaglebeagl1> metusine: actually, that won't help b/c the validation will still return the wrong field name
[00:36:00] <metusine> doh!
[00:36:00] <metusine> daeaglebeagl1, http://noobkit.com/show/ruby/rails/rails-edge/activerecord-edge/activerecord/validations/classmethods/validates_uniqueness_of.html
[00:36:00] <daeaglebeagl1> take it easy
[00:36:00] join puyo_
[00:36:00] <tiglionabbit> maybe I'm missing a library. I guess ruby-sqlite3 doesn't install the native bindings then
[00:36:00] quit puyo_
[00:37:00] quit eibro
[00:37:00] <tiglionabbit> Radar: I told you I tried that and it didn't help
[00:37:00] <Radar> omg
[00:37:00] <Radar> tiglionabbit:
[00:37:00] <Radar> http://www.google.com.au/search?hl=en&q=no+such+file+to+load+sqlite3%2Fdatabase&btnG=Google+Search&meta=
[00:38:00] <Radar> Alter the command to your directory.
[00:38:00] <Radar> yes.
[00:38:00] quit NewMonarch
[00:38:00] <tiglionabbit> oh wait, that's in a different directory
[00:39:00] <tiglionabbit> gentoo
[00:39:00] <context> tiglionabbit. what distr
[00:39:00] <tiglionabbit> nothing past /usr/local/lib is like that on my machine
[00:39:00] <tiglionabbit> and I don't have that directory
[00:40:00] <context> from*
[00:40:00] <context> ?
[00:40:00] <context> and it said it succeeded
[00:40:00] <context> gotcha
[00:40:00] <context> oh
[00:40:00] <context> wtf
[00:40:00] join rdesh
[00:40:00] <tiglionabbit> I installed gem manually from source and then installed ruby-sqlite3 with gem
[00:40:00] <context> gentoo doesnt use /usr/local everything is installed ti /usr
[00:40:00] <context> did you install form portage or gem
[00:41:00] <tiglionabbit> I did ruby-sqlite3. Is that wrong?
[00:41:00] <context> gem list --local|grep sqlite
[00:41:00] <context> so you did gem install sqlite3-ruby and not ruby-sqlite3 right ?
[00:41:00] <tiglionabbit> yes
[00:42:00] <context> does it show sqlite3-ruby (1.2.2) ?
[00:42:00] <tiglionabbit> no wait I am wrong
[00:42:00] <context> well it prolly sayd package not found
[00:44:00] join catalyst_media
[00:44:00] <tiglionabbit> has word gotten back to the gem authors of this thing yet?
[00:44:00] <tiglionabbit> found my gem dir, works now, cool
[00:45:00] <rdesh> *all
[00:45:00] <rdesh> hi LL
[00:46:00] <sqs> rdesh: observe_field
[00:46:00] <rdesh> in a form that i have, a user enters an e-mail address and a nickname. i want to prefill the nickname field by the e-mail username, and if that username exists then to increment a suffix for the nickname by 1 until it does not exist. I have the method written to do this. basically, on blur, i need a ruby method to run. how can i do this?
[00:46:00] quit pol_mb_
[00:47:00] <rdesh> sqs: awesome thanks
[00:47:00] join fhobia
[00:47:00] join pol_mb
[00:47:00] <sqs> rdesh: or manually use Prototype/JQuery
[00:48:00] join beeew
[00:52:00] quit catalyst_media
[00:52:00] join yammr
[00:53:00] <rdesh> sqs: but if i want to prefill the nickname field, would i use a combination of observe_field and something else to actually update the field contents?
[00:53:00] join yammr
[00:53:00] <yammr> exit
[00:53:00] <tiglionabbit> the development database looks fine, but the production one is blank
[00:53:00] <tiglionabbit> okay, new problem. I'm using passenger, and for some reason it is not creating any tables in my production database
[00:53:00] join muriel
[00:54:00] <yammr> any obvious reasons a dev environment would be requiring server reboots to reflect changes? apache2+mongrel on Mac OS 10.5
[00:54:00] quit jonny2
[00:55:00] <jtslade> yammr: I am not sure why but I need to reboot mongrel often on linux too. especially when routes are changed.
[00:56:00] <tiglionabbit> uh, how do I set up my production database?
[00:56:00] <yammr> I think one of my devs may have screwed with dispatch. would that do it?
[00:57:00] <yammr> jtslade: that's fine. thanks. we'll get it sorted.
[00:57:00] <jtslade> no
[00:57:00] <jtslade> yammr, I don't know enough to know the answer to that. sorry.
[00:57:00] <tiglionabbit> does that migrate them too?
[00:57:00] join bosie
[00:57:00] <jtslade> tiglionabbit, rake db:create:all to create dev/prod/test db
[00:57:00] <sqs> rdesh: you could have observe_field call an action that returns JS (using RJS), and that JS would fill the field
[00:58:00] <jtslade> tiglionabbit, it will just create the db, it wont migrate
[00:58:00] <tiglionabbit> still no tables
[00:58:00] <tiglionabbit> jtslade: didn't help
[00:58:00] <jtslade> yammr, ok good luck
[00:58:00] quit ttdonovan
[00:59:00] join ben_h_
[00:59:00] <jtslade> rake db:migrate RAILS_ENV="production" ?
[01:00:00] join Aut0zz
[01:01:00] <tenpaiyomi> Anybody here used Autocomplete recently?
[01:01:00] join tenpaiyomi
[01:02:00] <tiglionabbit> oh wait
[01:02:00] <tiglionabbit> jtslade: can I set it to default to production on this machine?
[01:02:00] quit f0rsaken
[01:03:00] <tiglionabbit> it's in the config/environment.rb file too :B
[01:03:00] <jtslade> tiglionabbit, export RAILS_ENV=production or set RAILS_ENV=production if on windows
[01:03:00] <tiglionabbit> got it
[01:03:00] <jtslade> gratz
[01:04:00] quit markyt_
[01:06:00] quit rmcafee
[01:06:00] quit ben_h
[01:08:00] quit BBHoss
[01:08:00] <TT> anyone know how to install the ferret gem on mac os x? it keeps installing the mswin32 version
[01:09:00] <jtslade> For the above case, how do I generate url that are all lowercase?
[01:09:00] quit tawker
[01:09:00] <jtslade> "/iso/uS/NY"
[01:09:00] <jtslade> ActionController::Routing::Routes.generate(route)
[01:09:00] <jtslade> route = {:state_iso_code=>"NY", :controller=>"states", :country_iso_code=>"uS", :action=>"show"}
[01:09:00] <jtslade> {:state_iso_code=>"NY", :controller=>"states", :country_iso_code=>"uS", :action=>"show"}
[01:10:00] nick
[01:10:00] join jstad
[01:10:00] <jtslade> in the Country model, I have to_params "#{iso_code}.downcase!" already
[01:10:00] <impurist> ?
[01:10:00] <impurist> anyone seen errors in test.log when loading a fixtures that have no model (such as a join tables)
[01:11:00] <PhatBaja> I'm looking for a web hosting service that works with ruby on rails, any suggestions?
[01:11:00] <nice_burger> TT: celebrate?
[01:11:00] <TT> is there anything special i need to do when transferring an application from a windows environment to mac os x?
[01:11:00] join PhatBaja
[01:12:00] <TT> but seriously, im getting errors regarding the acts_as_ferret and ferret gems
[01:14:00] <TT> doesnt anyone who develops in windows have to do this eventually? or to linux at least on the servers?
[01:14:00] join moccuo
[01:15:00] quit JamesKilton
[01:15:00] quit phoenixfire159
[01:15:00] join dgs
[01:16:00] quit rdavila
[01:19:00] join markyt
[01:19:00] <jtslade> PhatBaja, http://www.slicehost.com
[01:21:00] <jtslade> PhatBaja, I know HostGator.com offers good shared hosting with shell access (necessary for rails)
[01:21:00] <PhatBaja> jtslade: That one is more like a developer tool and therefore too costly, I'm just looking for a host
[01:21:00] join TJHooker
[01:22:00] <PhatBaja> jtslade: That one looks good. Thank you
[01:22:00] quit nice_burger
[01:23:00] <jtslade> PhatBaja, np
[01:23:00] quit zarqman
[01:24:00] <jtslade> what is the sql command for downcasing?
[01:24:00] join nashk
[01:25:00] <PhatBaja> Isn't it DOWNCASE(field_name)?
[01:26:00] <PhatBaja> :-P Sorry about it
[01:26:00] quit collink
[01:26:00] <jtslade> its LOWER() i think. thnaks.
[01:27:00] join hankjin
[01:28:00] <jtslade> np
[01:29:00] nick
[01:29:00] quit hankjin
[01:29:00] quit RyanTM
[01:32:00] quit perezd88
[01:32:00] join hankjin
[01:33:00] quit hankjin
[01:33:00] quit rdesh
[01:34:00] join hankjin
[01:34:00] join thehcdreamer
[01:36:00] join melvinsembrano
[01:37:00] quit linoj
[01:41:00] join chrgra
[01:42:00] quit nashk
[01:42:00] join rdesh
[01:44:00] <chrgra> hi um i hate to ask, but can anyone help out with this small thing? i made a login app using acts_as_authenticated, what i want to do is make it so that when the user logs in, the page asks the user to submit their actual name and after doing show it's says "Hello and Welcome <name>"
[01:45:00] <chrgra> i created the text field and submit button in ajax and imported prototype, but when i write in the text box and submit the name it doesn't show the "Hello and Welcome <name>
[01:46:00] join snitko
[01:49:00] <context> chrgra. and you can easily check the user and/or profile and if they dont have a real name setup forcefully have them fill it out
[01:49:00] <context> chrgra. use restful_authentication if its a new app
[01:49:00] quit hankjin
[01:50:00] <chrgra> i already have a way of displaying the username
[01:50:00] <chrgra> well all i want is for the user to enter a page and enter there name if so that the app say hi to them
[01:51:00] quit aquabu
[01:52:00] quit nat2610
[01:52:00] join hankjin
[01:53:00] <chrgra> is it an ajax problem. i really used this guide for some help http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html?page=2
[01:54:00] quit melvin
[01:55:00] quit hankjin
[01:56:00] <msaraujo> is there a way to solve that issue? http://paste2.org/p/56494
[01:56:00] <msaraujo> hey
[01:56:00] join msaraujo
[01:57:00] quit bosie
[01:57:00] <chrgra> well your missing a method
[01:57:00] join jonny2
[01:58:00] <arooni> any idea why?
[01:58:00] <arooni> class NotifyMailer < ActionMailer::Base ....... when i do : NotifyMailer::deliver_offer(user) ... i get: NameError: uninitialized constant NotifyMailer
[01:58:00] <msaraujo> I am using pure Ruby
[01:58:00] <chrgra> then do a db:migrate and run tests again