[Rails] attr_accessor as boolean

2010-03-24 Thread Tom Mac
Hi I have in my user model attr_accessor :no_password_validation_needed with_options :unless = :no_password_validation_needed do |p| p.validates_length_of :password, :minimum = 6 p.validates_confirmation_of :password end And from controller I do

[Rails] Re: regular expression

2010-03-24 Thread DmitryPush
$ irb module$block.item[/\$([^.]*)\./,1] = block -- 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

[Rails] Re: netbeans on ubuntu

2010-03-24 Thread Bigos
it's not going to work on Ubuntu if you have installed Ruby Gems from repositories. ja...@jacek-desktop:~$ sudo gem update --system [sudo] password for jacek: ERROR: While executing gem ... (RuntimeError) gem update --system is disabled on Debian. RubyGems can be updated using the official

[Rails] Re: netbeans on ubuntu

2010-03-24 Thread Viorel
Thanks for your quick answers. Michel: 6.7 is the latest version on Ubuntu repository, it comes with apt-get Colin: You are right. Both: Tried that. It seams I didn't do it where I should, because in terminal I get sudo: gem: command not found Can I do it from Netbeans? -- You received this

[Rails] rubyzip not recognized in rails

2010-03-24 Thread Jay
First of all, Let me list my configurations: FreeBSD 8.0 Ruby 1.9.1p376 Rails 2.3.5 rubyzip 0.9.4 installed in /usr/local/lib/ruby19/gems/1.9/gems/ rubyzip-0.9.4 I have placed the following line inside Rails::Initializer.run block cconfig.gem 'rubyzip', :lib = 'zip/zip' However, I

[Rails] Re: How to move ruby from /usr/bin/ to /usr/local/bin/ on OSX Snow leopard 10.6

2010-03-24 Thread Peter
Hey thanks for the help but i think i solved my problem now, I downloaded the latest xcode and made sure i restarted the computer before reinstalling everything, now says its in /usr/local/bin/ruby where the the tutorial says it should be. On Mar 23, 8:25 pm, Peter peterorp...@me.com wrote: Hi

[Rails] Re: How to move ruby from /usr/bin/ to /usr/local/bin/ on OSX Snow leopard 10.6

2010-03-24 Thread ken foust
Peter peterorp...@... writes: Hi i'm a beginner to ruby on rails and I am trying to start a tutorial http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard but still can't get it in the local folder. ANy help would be very grateful. Regards Peter Peter is

[Rails] Re: attr_accessor as boolean

2010-03-24 Thread Frederick Cheung
On Mar 24, 6:09 am, Tom Mac li...@ruby-forum.com wrote:     But now when @user.no_password_validation_needed = 2  #or any other value         Now I get unexpected result as validation not happens That is same result when true? Why this?What modification should I make?Please help That's

Re: [Rails] rubyzip not recognized in rails

2010-03-24 Thread Gintautas Šimkus
There is a typo in initilizer. Also require 'rubygems` in your code before requiring zip/zip 2010/3/24 Jay janus...@gmail.com First of all, Let me list my configurations: FreeBSD 8.0 Ruby 1.9.1p376 Rails 2.3.5 rubyzip 0.9.4 installed in /usr/local/lib/ruby19/gems/1.9/gems/

[Rails] Re: attr_accessor as boolean

2010-03-24 Thread Luke Pearce
Does this help? irb puts show if true show puts show if false = nil puts show if nil = nil puts show if 2 show puts show if DateTime.new show In ruby it'll be true unless it receives nil or false. Kind Regards Luke -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: add contacts in those excel file to contact list

2010-03-24 Thread Luke Pearce
Tony Augustine wrote: hi i wanted to upload a file using file uploader. alsoi wanted to add those contacts in those excel file to contact list how i can do this in rails.pls help To upload look at the paperclip plugin: http://github.com/thoughtbot/paperclip Excel is a bit more

Re: [Rails] Re: attr_accessor as boolean

2010-03-24 Thread Michael Pavling
On 24 March 2010 08:07, Frederick Cheung frederick.che...@gmail.com wrote: That's how truth values work in ruby - anything other than nil or false is generally considered true. Have a look at the Ruby Facets library for their kernel.true? method:

Re: [Rails] Re: regular expression

2010-03-24 Thread Andy Jeffries
Dmitry posted pretty much the same solution as I did, but a slightly different regular expression. On Ruby 1.8.7 (your Ruby version may vary) my regex is *slightly* faster. On Ruby 1.9.1 his is *slightly* faster. The difference is 0.3s over 10,000,000 iterations, so either way it's pretty

[Rails] Re: add contacts in those excel file to contact list

2010-03-24 Thread Tony Augustine
Luke Pearce wrote: Tony Augustine wrote: hi i wanted to upload a file using file uploader. alsoi wanted to add those contacts in those excel file to contact list how i can do this in rails.pls help To upload look at the paperclip plugin: http://github.com/thoughtbot/paperclip

Re: [Rails] Re: netbeans on ubuntu

2010-03-24 Thread Colin Law
On 24 March 2010 07:31, Bigos ruby.obj...@googlemail.com wrote: it's not going to work on Ubuntu if you have installed Ruby  Gems from repositories. I think it is generally considered better not to install from the repositories. I used the technique from

[Rails] Re: regular expression

2010-03-24 Thread DmitryPush
A came to ruby from perl and as I know my solution faster there. Ofcourse in this case it doesn't matter. But understating how works your and mine solutions may be useful... I've seen your massage and post mine only for educational reasons. Plus mine look's nicer, I just kidding:) PS I don't know

Re: [Rails] Re: regular expression

2010-03-24 Thread Andy Jeffries
On 24 March 2010 09:22, DmitryPush dmitryp...@gmail.com wrote: A came to ruby from perl and as I know my solution faster there. Ofcourse in this case it doesn't matter. But understating how works your and mine solutions may be useful... Absolutely I've seen your massage and post mine only

Re: [Rails] Re: How to move ruby from /usr/bin/ to /usr/local/bin/ on OSX Snow leopard 10.6

2010-03-24 Thread Conrad Taylor
On Tue, Mar 23, 2010 at 5:09 PM, Peter peterorp...@me.com wrote: Hey thanks for the help but i think i solved my problem now, I downloaded the latest xcode and made sure i restarted the computer before reinstalling everything, now says its in /usr/local/bin/ruby where the the tutorial says it

[Rails] server wont start

2010-03-24 Thread Zayd Connor
In my command line I type script/server and I get the following error below: /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:826:in `report_activate_error': RubyGem version error: rack(0.9.1 not ~ 1.0.1) (Gem::LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:260:in `activate' from

Re: [Rails] server wont start

2010-03-24 Thread Gary Doades
On 24/03/2010 10:34 AM, Zayd Connor wrote: In my command line I type script/server and I get the following error below: /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:826:in `report_activate_error': RubyGem version error: rack(0.9.1 not ~ 1.0.1) (Gem::LoadError) I see the rubygem version

[Rails] Store created_at in Hawaii's time zone UTC-10

2010-03-24 Thread Tushar Gandhi
Hi, I have to use Hawaii's time zone which is UTC-10 for my created_at. Can anyone tell me how can I solve this problem? Thanks, Tushar -- 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

Re: [Rails] Store created_at in Hawaii's time zone UTC-10

2010-03-24 Thread Colin Law
On 24 March 2010 10:39, Tushar Gandhi li...@ruby-forum.com wrote: Hi, I have to use  Hawaii's time zone which is UTC-10 for my created_at. Can anyone tell me how can I solve this problem? Times should generally always be stored in UTC, then there is no confusion about the time. Display it in

[Rails] Re: Fixtures and Associations

2010-03-24 Thread David Ishmael
I added the entries to the test/fixtures/node_groups.yml file and that seems to have worked - thanks. For some reason I thought I could link the nodes through the test/fixtures/nodes.yml file. As for the relationship, the Node can have one or more children but only one parent. The idea is that

[Rails] Re: rendering simple html from view/controller

2010-03-24 Thread adedip
I guess is something dealing with this: attr_accessor :name isn't it? On 15 Mar, 14:16, adedip ade...@gmail.com wrote: Hi guys..I did try almost everything..but still cant' get any result.. Starting from a simple scaffold creating a class called reference I have updated the controller with

[Rails] Re: rendering simple html from view/controller

2010-03-24 Thread Punit Rathore
then I've updated the routes.rb file with this line (do I have to replace the already in map.resources :references or do i add this second new line?): -- map.resources :references, :collection = {load = get} -- You have to replace the line. -- Posted via http://www.ruby-forum.com/. -- You

Re: [Rails] Re: Fixtures and Associations

2010-03-24 Thread Colin Law
On 24 March 2010 10:51, David Ishmael li...@ruby-forum.com wrote: I added the entries to the test/fixtures/node_groups.yml file and that seems to have worked - thanks. For some reason I thought I could link the nodes through the test/fixtures/nodes.yml file. As for the relationship, the Node

[Rails] Re: Re: Fixtures and Associations

2010-03-24 Thread David Ishmael
To clarify... Node is a self-referential object. Here is the class for the Node object. class Node ActiveRecord::Base belongs_to :category belongs_to :status has_one :parents, :class_name = NodeGroup, :foreign_key = child_id has_one :parent, :through = :parents

Re: [Rails] Re: add contacts in those excel file to contact list

2010-03-24 Thread David Chua
You might need to use a parser like fastercsv to get values out of your csv. David On Mar 24, 2010 5:16 PM, Tony Augustine li...@ruby-forum.com wrote: Luke Pearce wrote: Tony Augustine wrote: hi i wanted to upload a file using file uploader actuallly i think u ddnt get ma requirement

Re: [Rails] Re: Re: Fixtures and Associations

2010-03-24 Thread Colin Law
You have snipped everything again so that it will make it difficult for people to follow the thread. On 24 March 2010 11:25, David Ishmael li...@ruby-forum.com wrote: To clarify... Node is a self-referential object. Here is the class for the Node object. class Node ActiveRecord::Base  

[Rails] Problem Installing Passenger

2010-03-24 Thread Christophe Decaux
Hi there, I'm trying to install passenger on a hosted server which has Ubuntu 9.04 Ruby 1.8.6 Rails 2.3.5 Apache 2 I had some trouble with gem install passenger, but went through after installing build-essential which were not on the machine. First when I launched

Re: [Rails] Problem Installing Passenger

2010-03-24 Thread Leonardo Mateo
On Wed, Mar 24, 2010 at 9:08 AM, Christophe Decaux christophe.dec...@gmail.com wrote: Hi there, I'm trying to install passenger on a hosted server which has Ubuntu 9.04 Ruby 1.8.6 Rails 2.3.5 Apache 2 I had some trouble with gem install passenger, but went through after installing

Re: [Rails] Problem Installing Passenger

2010-03-24 Thread Christophe Decaux
Thanks Leonardo, I installed everything with gem Anyone else ? Le 24 mars 2010 à 13:13, Leonardo Mateo a écrit : On Wed, Mar 24, 2010 at 9:08 AM, Christophe Decaux christophe.dec...@gmail.com wrote: Hi there, I'm trying to install passenger on a hosted server which has Ubuntu 9.04 Ruby

[Rails] HTTP 505 Error

2010-03-24 Thread tashfeen.ekram
I am trying to make a GET request to the below listed url which should return an XML. When I put the compete url in my browser, I get the intended XML. http://axml.travelnow.com/external/xmlinterface.jsp?cid=1resType=airintfc=wsxml=AirSessionRequest

[Rails] Re: Re: Re: Fixtures and Associations

2010-03-24 Thread David Ishmael
That worked perfectly, thanks! -- 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 email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: HTTP 505 Error

2010-03-24 Thread tashfeen.ekram
There error I get is: HTTPVersionNotSupported# 505 On Mar 24, 8:48 am, tashfeen.ekram tashfeen.ek...@gmail.com wrote: I am trying to make a GET request to the below listed url which should return an XML. When I put the compete url in my browser, I get the intended XML.

[Rails] Re: netbeans on ubuntu

2010-03-24 Thread Viorel
Again, thanks Colin this is great for ROR but I tried Netbeans. On Mar 24, 11:20 am, Colin Law clan...@googlemail.com wrote: On 24 March 2010 07:31, Bigos ruby.obj...@googlemail.com wrote: it's not going to work on Ubuntu if you have installed Ruby  Gems from repositories. I think it is

Re: [Rails] Re: netbeans on ubuntu

2010-03-24 Thread Gintautas Šimkus
Hey, not my intent to hijack the thread, but what's better about Netbeans on *nix system compaired to gvim or other advanced editor? -- 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: Re: Re: Fixtures and Associations

2010-03-24 Thread Colin Law
On 24 March 2010 12:48, David Ishmael li...@ruby-forum.com wrote: That worked perfectly, thanks! What did? It is not clear which email you are responding to as you have snipped it all. You might save some time by looking at acts_as_tree or probably even better awsome_nested_set. Colin --

[Rails] Fixtures and Associations

2010-03-24 Thread David Ishmael
I modified the Node class using the code you provided, updated the model in the database, and then tested with success. To be clear, I am referring to your code below. belongs_to: parent, :class_name = Node, :foreign_key = parent_id has_many: children, :class_name = Node Everything appears to

[Rails] Re: Problem Installing Passenger

2010-03-24 Thread DmitryPush
try to install 'ruby-devel', in ubuntu it 'gem install ruby-devel' I guess Is it helps? On Mar 24, 3:17 pm, Christophe Decaux christophe.dec...@gmail.com wrote: Thanks Leonardo, I installed everything with gem Anyone else ? Le 24 mars 2010 à 13:13, Leonardo Mateo a écrit : On Wed, Mar 24,

[Rails] Unpacked wrong version of gem, can't get back

2010-03-24 Thread Max Williams
Hey all I got myself into a bit of a corner. I unpacked hpricot 0.8.2 into my vendor/gems folder then realised that i needed to unpack 0.8.1 instead. No problem, i thought, i'll just delete that folder out of gems, change the config.gem specification in environment.rb, and do it again. But now

[Rails] Passenger Error in apache2

2010-03-24 Thread Vetrivel Vaithilingam
I installed Passenger successfully . After installing I have added below three lines in apache2.conf. LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11 PassengerRuby /usr/bin/ruby1.8

[Rails] Re: Rails 3 beta plugins

2010-03-24 Thread Ken Foust
Ken, you need to add the following to your Gemfile: gem authlogic, :git = git://github.com/binarylogic/authlogic.git Then you'll invoke the following command: $ bundle install Good luck, -Conrad Thanks conrad, The following is what I am getting - do I need a configuration for

[Rails] Attack on Twitter

2010-03-24 Thread tispratik
Hello, Does anyone know the reason for the vulnerability in Twitter when a lot of DOS attacks were made? Were they due to the design of the application or the server where they hosted got attacked? Thanks, Pratik -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails] Re: Rails 3 beta plugins

2010-03-24 Thread Fidel Viegas
On Wed, Mar 24, 2010 at 2:20 PM, Ken Foust li...@ruby-forum.com wrote: Thanks conrad, The following is what I am getting - do I need a configuration for git Fetching git://github.com/binarylogic/authlogic.git sh: git: command not found An error has occurred in git. Cannot complete bundling.

[Rails] Trying to use sphinx search engine

2010-03-24 Thread Sumeet Panchal
Hi, All any kind of help is appreciated. and thanks a lot. I have to apply sphinx search on my project. My development environment is windows, My SQL, Ruby Rails but the project is deployed on Ubuntu. Q1 ) Can I use sphinx. Will it be a problem if the development is on windows and deployment is

[Rails] Sybase IQ Developer needed with 5-7 yrs experience

2010-03-24 Thread Murali Javaji
Hi Friends, Plz send profiles matching the requirement to mur...@javaji.com Role : *Sybase IQ Developer* Location : *Tampa FL* Duration : *6m *Client : *Banking* *Sybase IQ Developer needed with 5-7 yrs exp.* Thanks and Regards, Murali 571 483 2829 Javaji Systems Solutions Inc.,

[Rails] SharePoint Developer required

2010-03-24 Thread Murali Javaji
Hi Friends, Plz send profiles matching the requirement to mur...@javaji.com Title : *SharePoint Developer* Location : *Los Angeles CA* Duration : *6m *Client : *Banking will prefer local candidates* ** Thanks and Regards, Murali 571 483 2829 Javaji Systems Solutions Inc., www.javaji.com --

[Rails] Re: Unpacked wrong version of gem, can't get back

2010-03-24 Thread Max Williams
I managed to solve this by uninstalling version 0.8.2 of the hpricot gem. Which has confused me even more ... does my gems folder know what's going on in my rails app??? buh? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] UAT Coordinator with UAT Testing project co-ordination skills

2010-03-24 Thread Murali Javaji
Hi Friends, Plz send profiles matching the requirement to mur...@javaji.com Title : *UAT Coordinator* Location : *NJ *Duration :* 6m* Client :* Banking* *UAT testing/ project coordination skills.* Thanks and Regards, Murali 571 483 2829 Javaji Systems Solutions Inc., www.javaji.com

[Rails] Re: netbeans on ubuntu

2010-03-24 Thread Viorel
Gintautas: I don't know. I want to find out! On Mar 24, 3:10 pm, Gintautas Šimkus dihita...@gmail.com wrote: Hey, not my intent to hijack the thread, but what's better about Netbeans on *nix system compaired to gvim or other advanced editor? -- You received this message because you are

Re: [Rails] Re: netbeans on ubuntu

2010-03-24 Thread Gintautas Šimkus
I think I only use 10% of features of gvim and still it gets the job done :) That's why I am asking :) what benefits Aptana or Eclipse give over gvim? :) 2010/3/24 Viorel viorelvl...@gmail.com Gintautas: I don't know. I want to find out! On Mar 24, 3:10 pm, Gintautas Šimkus

[Rails] javascript add text fields

2010-03-24 Thread ES
I am trying to add a functionality similar to adding an attachment to an email in Gmail. I have a form to create object1. One field is to add a book reference. When you click the link add book a popup opens with the book form. Clicking the add button closes the popup and puts the title of the

[Rails] Re: Re: Rails 3 beta plugins

2010-03-24 Thread Ken Foust
Fidel Viegas wrote: On Wed, Mar 24, 2010 at 2:20 PM, Ken Foust li...@ruby-forum.com wrote: Thanks conrad, The following is what I am getting - do I need a configuration for git Fetching git://github.com/binarylogic/authlogic.git sh: git: command not found An error has occurred in git.

Re: [Rails] Re: netbeans on ubuntu

2010-03-24 Thread Michael Pavling
On 24 March 2010 14:56, Gintautas Šimkus dihita...@gmail.com wrote: I think I only use 10% of features of gvim and still it gets the job done :) That's why I am asking :) what benefits Aptana or Eclipse give over gvim? :) Depends what you like, but the conversation's been had before:

Re: [Rails] Re: Unpacked wrong version of gem, can't get back

2010-03-24 Thread Rob Biedenharn
On Mar 24, 2010, at 10:48 AM, Max Williams wrote: I managed to solve this by uninstalling version 0.8.2 of the hpricot gem. Which has confused me even more ... does my gems folder know what's going on in my rails app??? buh? No, but rubygems knows that you want the highest available version

[Rails] Re: Cookie overflow?

2010-03-24 Thread Tyson Kn
Julian Leviston wrote: Yes, you should store simply an array of ID's, not the entire objects. An ID (integer) is about 4 bytes or so from memory, so it won't be terribly much information... -- Learn: http://sensei.zenunit.com/ Last updated

[Rails] Re: Re: Unpacked wrong version of gem, can't get back

2010-03-24 Thread Max Williams
Rob Biedenharn wrote: You might have been requiring it somewhere earlier than Rails processed the config.gem that limited (specified) the version that you wanted. ah - in one of the other frozen gems or plugins you mean? I did a search of my application and the only reference i could find

[Rails] Re: Re: Unpacked wrong version of gem, can't get back

2010-03-24 Thread Max Williams
Hi Rob - my first statement in that last post was actually a lie - haml (which i have in my plugins) requires hpricot, that must be the source of the first problem. I'd still like to know why it's complaining about me needing to build the gem though. -- Posted via http://www.ruby-forum.com/.

[Rails] Multilingual Email Within UserObserver?

2010-03-24 Thread Hugues Brunelle
Hello, I have a beta testing program for a multilingual webapp using globalite. People register on the website in english or in french. I use a UserObserver from acts_as_authenticated plugin that send an email with an activation code to validate registration. Depending on which language... I

[Rails] Re: Calculate Probability?

2010-03-24 Thread Heinz Strunk
Thanks guys, I found the problem. There was another factor that made look the rand not correct. Everything's just fine now :) -- 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

[Rails] Re: server wont start

2010-03-24 Thread Zayd Connor
Gary Doades wrote: On 24/03/2010 10:34 AM, Zayd Connor wrote: Up and running!! Thanks Gary Kindest Regards Zayd Yes, but it's the rack version it is complaining about, not rails. gem install rack -v=1.0.1 Cheers, Gary. -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] grouping and acts_as_tree

2010-03-24 Thread tom
hi, im using acts_as_tree and im not sure on how to group find-result. x = find.almost_all p % for y in @x.ancestors.reverse % %= link_to h(y.title), page % gt; % end % /p gives me a nice breadcrum. but how is it possible to group the list lets say by the 1level or second level? thx --

[Rails] Re: rubyzip not recognized in rails

2010-03-24 Thread Jay
Thanks for replying, Gintautas. The typo was not in the environment.rb. I did try to add require 'rubygems' before require 'zip/zip' but it still doesn't work. nor require 'composite_primary_keys' works. It seems the gems installed is not recognized at all. :' ( On Mar 24, 4:12 pm, Gintautas

[Rails] Re: rubyzip not recognized in rails

2010-03-24 Thread Jay
Furthermore, I have tried to add ENV['GEM_PATH'] = '/usr/local/lib/ruby19/gems/1.9' at the beginning of the environment.rb but still failed. -- 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] NGINX login problem

2010-03-24 Thread Chuck Kyberian
Hi, I have a problem with login to my application. I use nginx as load-balancer and mongrel cluster as application servers. I have 2 servers and 8 mongrels per server. When I try to login directly on mongrel, everything is ok. But if I use to login nginx, login sometimes failed - login and

[Rails] link_to underlying urls/paths are showing in the actual view

2010-03-24 Thread Adler Santos
for example I have the following simple code in my views: %= link_to Here, :controller = 'home', :action = 'inside_here' % I get the actual view in the page looking like this: Here (/home/inside_here) where the underlying url is showing right beside the Here word. By default, the Here word

[Rails] Re: Re: Authlogic Rails 3

2010-03-24 Thread Ken Foust
Conrad Taylor wrote: On Fri, Feb 19, 2010 at 1:08 AM, RaW ra...@wrzochol.net wrote: I think $ script/generate has been replaced with $ r g in Rails3 Am I right? You'll need to do the following in Rails 3: rails g model user_session Then just edit the file and you should be good

Re: [Rails] link_to underlying urls/paths are showing in the actual view

2010-03-24 Thread Philip Hallstrom
for example I have the following simple code in my views: %= link_to Here, :controller = 'home', :action = 'inside_here' % I get the actual view in the page looking like this: Here (/home/inside_here) where the underlying url is showing right beside the Here word. By default, the Here word

[Rails] Re: need to parse a User uploaded file, but don't care if it's saved

2010-03-24 Thread Jeff Lewis
re: where is it read from?: I use passenger to serve my rails apps these days (all running on *nix), and per the passenger docs: http://www.modrails.com/documentation/Users%20guide.html#_passengertempdir_lt_directory_gt ... 5.10. PassengerTempDir directory Specifies the directory that Phusion

[Rails] accessing object attributes

2010-03-24 Thread ES
I have an hash of display names and their corresponding object attribute names called @columns. As I iterate through @columns, what is the syntax for accessing the attribute of the object using c? I get an error on the 4th line. % for c in @columns[object_+...@object.categorie] do %

[Rails] UAT Coordinator with UAT testing/ project coordination skills

2010-03-24 Thread Murali Javaji
Hi Friends, Plz send profiles matching the requirement to mur...@javaji.com Title :* UAT Coordinator* Location : *NJ *Duration :* 6m *Client : *Banking UAT testing/ project coordination skills* Thanks and Regards, Murali 571 483 2829 Javaji Systems Solutions Inc., www.javaji.com -- You

[Rails] Sybase IQ Developer needed with 5-7 yrs exp

2010-03-24 Thread Murali Javaji
Hi Friends, Plz send profiles matching the requirement to mur...@javaji.com Role : *Sybase IQ Developer* Location: *Tampa FL* Duration: *6m *Client: *Banking* *Sybase IQ Developer needed with 5-7 yrs exp* Thanks and Regards, Murali 571 483 2829 Javaji

[Rails] Trouble starting the server, HELP PLEASE!

2010-03-24 Thread Peter
can anybody tell me what is going wrong from the information taken from the development log below. WHen i start WEBrick and try and view a page on the localhost i get the following error, We're sorry, but something went wrong.We've been notified about this issue and we'll take a look at it

Re: [Rails] Attack on Twitter

2010-03-24 Thread John Adams
On Mar 24, 2010, at 7:40 AM, tispratik wrote: Hello, Does anyone know the reason for the vulnerability in Twitter when a lot of DOS attacks were made? Were they due to the design of the application or the server where they hosted got attacked? It was a widely publicized distributed denial

[Rails] tuple spaces and rails

2010-03-24 Thread John Merlino
Hey all, in building an application that will require multiple ajax calls occuring concurently to different database tables in order to display data in a form, and then require user input to modify data and then update it to the database, which invokes a multi-step transaction, that is, making

[Rails] More elegant solution for missing has-many through ids?

2010-03-24 Thread Dudebot
I have LabGroup and LabDesc which have many through LabDescGroup. I'd like to identify LabDescs which don't have a LabGroup. This works: x = [] LabDescGroup.find( :all, :select = 'DISTINCT lab_desc_id' ).each{ |c| x c.lab_desc_id } y = [] LabDesc.find( :all, :select = 'id' ).each{ |c| y c.id

Re: [Rails] accessing object attributes

2010-03-24 Thread Hassan Schroeder
On Wed, Mar 24, 2010 at 10:31 AM, ES emsto...@gmail.com wrote: I have an hash of display names and their corresponding object attribute names called @columns. As I iterate through @columns, what is the syntax for accessing the attribute of the object using c? I get an error on the 4th line.  

[Rails] how to create a search-agent

2010-03-24 Thread tom
hi, im currently utilizing searchlogic. now they want me to add a searchagent, meaning u can save your criterias and get notified whenever something suitable hits the database. am i correct that all i need to do is to store the searchlogic-params in a userfield and run a daily job to execute the

Re: [Rails] Re: Re: Authlogic Rails 3

2010-03-24 Thread Conrad Taylor
Sent from my iPhone On Mar 24, 2010, at 10:06 AM, Ken Foust li...@ruby-forum.com wrote: Conrad Taylor wrote: On Fri, Feb 19, 2010 at 1:08 AM, RaW ra...@wrzochol.net wrote: I think $ script/generate has been replaced with $ r g in Rails3 Am I right? You'll need to do the following in

[Rails] Re: Auto Trim w/ Erubis (Rails 3.0 beta)

2010-03-24 Thread cult hero
In case anyone else cares... looks like this is a bug and doesn't work quite right. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2553-actionviewtemplatehandlerserberb_trim_mode-broken#ticket-2553-13 On Mar 22, 8:40 pm, cult hero binarypala...@gmail.com wrote: Hey, I'm

[Rails] Mechanize

2010-03-24 Thread Nirav Parekh
Hi I am trying to submit an asp form using Mechanize. I have to parse this site in order to get the results http://www.vitranexpress.com/home/CombinedHome.aspx So for this I have to log in the site which I was successful using Mechanize. Once you logged in you have to select the Link Rate

[Rails] dispatch.cgi, dispatch.fcgi, dispatch.rb not present in Public folder

2010-03-24 Thread Peter
I'm doing a series of ruby on rails tutorials and it got to a part where i need to edit the following files that should be automatically inside the public folder: dispatch.cgi,dispatch.fcgi,dispatch.rb but I have none of these inside my public folder. Is there a reason for this? And how can i

[Rails] Re: netbeans on ubuntu

2010-03-24 Thread Viorel
You were right, Bigos. It doesn't work. Apt-get updates rubygems for ruby, not jruby from Netbeans. Anyway, I resoved the problem by installing 6.8 from Netbeans. Thank you all! Gintautas: Just curiosity: Did you ever tried Netbeans? Michael: English is not my native language. What is YMMY? --

[Rails] dispatch.cgi, dispatch.fcgi, dispatch.rb not present in Public folder

2010-03-24 Thread Peter
I'm doing a series of ruby on rails tutorials and it got to a part where i need to edit the following files that should be automatically inside the public folder: dispatch.cgi,dispatch.fcgi,dispatch.rb but I have none of these inside my public folder. Is there a reason for this? And how can i

[Rails] Re: Trouble starting the server, HELP PLEASE!

2010-03-24 Thread Peter
dont worry about this, i just stopped trying to have a version of ruby in my local folder and everything seems to work fine now On Mar 24, 5:40 pm, Peter peterorp...@me.com wrote: can anybody tell me what is going wrong from the information taken from the development log below. WHen i start

[Rails] attr_accessor in AR models?

2010-03-24 Thread elliottg
Am I correct in thinking that one cannot use attr_accessor in ActiveRecord models? I have success when using either cattr_accessor or mattr_accessor but not the native Ruby method. Am I missing something here, or is this how it really is? Thanks. Elliott G -- You received this message because

Re: [Rails] dispatch.cgi, dispatch.fcgi, dispatch.rb not present in Public folder

2010-03-24 Thread Lasse Bunk
Check out http://www.anchor.com.au/hosting/dedicated/Running-Rails-2.3-Using-CGI-with-Rackunder The Meat. /Lasse 2010/3/24 Peter peterorp...@me.com I'm doing a series of ruby on rails tutorials and it got to a part where i need to edit the following files that should be automatically inside

Re: [Rails] dispatch.cgi, dispatch.fcgi, dispatch.rb not present in Public folder

2010-03-24 Thread Lasse Bunk
Or you could use mod_rails http://www.modrails.com/ (Passenger) instead. /Lasse 2010/3/24 Lasse Bunk lasseb...@gmail.com Check out http://www.anchor.com.au/hosting/dedicated/Running-Rails-2.3-Using-CGI-with-Rackunder The Meat. /Lasse 2010/3/24 Peter peterorp...@me.com I'm doing a

Re: [Rails] attr_accessor in AR models?

2010-03-24 Thread Lasse Bunk
You _can_ use attr_accessor in ActiveRecord models. Like this: class Article ActiveRecord::Base attr_accessor :my_prop end Maybe you could post some code and/or error message. /Lasse 2010/3/24 elliottg x...@simplecircle.net Am I correct in thinking that one cannot use attr_accessor

Re: [Rails] dispatch.cgi, dispatch.fcgi, dispatch.rb not present in Public folder

2010-03-24 Thread Peter Simmons
thank you, so they aren't meant to be there nowadays, I originally thought i had done something wrong, i can move on now, cheers On 24 Mar 2010, at 20:25, Lasse Bunk wrote: Or you could use mod_rails (Passenger) instead. /Lasse 2010/3/24 Lasse Bunk lasseb...@gmail.com Check out

Re: [Rails] Re: redirection in format.json ...

2010-03-24 Thread Lasse Bunk
Maybe you're not requesting it properly, making sure that you call the format.json part? It seems it redirects to requests_url in format.html. /Lasse 2010/3/23 Kad Kerforn li...@ruby-forum.com in my controller the create action is : respond_to do |format| if @request.save

Re: [Rails] Re: redirection in format.json ...

2010-03-24 Thread Lasse Bunk
Just to clarify: A proper json request is to call /path.json or call /path (with or without .json) with an Accept: application/json header. /Lasse 2010/3/24 Lasse Bunk lasseb...@gmail.com Maybe you're not requesting it properly, making sure that you call the format.json part? It seems it

Re: [Rails] dispatch.cgi, dispatch.fcgi, dispatch.rb not present in Public folder

2010-03-24 Thread Lasse Bunk
Glad you found out :) /Lasse 2010/3/24 Peter Simmons peterorp...@me.com thank you, so they aren't meant to be there nowadays, I originally thought i had done something wrong, i can move on now, cheers On 24 Mar 2010, at 20:25, Lasse Bunk wrote: Or you could use mod_rails

[Rails] Re: Upcoming app Research and Prep

2010-03-24 Thread Matt Jones
On Mar 23, 4:58 pm, brianp brian.o.pea...@gmail.com wrote: Hey everyone. I'm a one person team and in the next month need to produce and deploy an application. I've been playing with rails for a little over a year now and recently deployed my first app as a private contract. I'm now

[Rails] Re: attr_accessor in AR models?

2010-03-24 Thread elliottg
Hi Lasse. I think I may be able to get to the point a bit better with 2 more questions... Am I correct in thinking that attr_accessor always returns or sets an instance variable? Another reason I'm confused, is that, when I set an attr_accessor :foo in my model and then drop into script/console

Re: [Rails] Re: attr_accessor in AR models?

2010-03-24 Thread Lasse Bunk
Thats because mattr_accessor is at module level, cattr_accessor is at class level, and attr_accessor is at instance level. So you have to use class.instance_methods to find your method – like this: class_name.instance_methods.grep(/method_name/) /Lasse 2010/3/24 elliottg

[Rails] flash error fade away

2010-03-24 Thread tom
this is my current code: #notice { border: solid 1px #99cc99; background-color: #e2f9e3; color: #006600; padding: 5px; margin-bottom: 5px; } #notice.error { border-color: #e2f9e3; background-color: #ee; color: #cc; } % flash.each do |key, msg| % %= content_tag :div, flash[:error] ||

Re: [Rails] More elegant solution for missing has-many through ids?

2010-03-24 Thread Lasse Bunk
This should do it: LabDesc.find(:all, :conditions = 'NOT EXISTS(SELECT * FROM lab_desc_groups WHERE lab_desc_id=lab_descs.id)') /Lasse 2010/3/24 Dudebot craign...@gmail.com I have LabGroup and LabDesc which have many through LabDescGroup. I'd like to identify LabDescs which don't have a

[Rails] Re: attr_accessor in AR models?

2010-03-24 Thread elliottg
That clearly explains some of the issues I was having. Thanks a ton! EG On Mar 24, 5:36 pm, Lasse Bunk lasseb...@gmail.com wrote: Thats because mattr_accessor is at module level, cattr_accessor is at class level, and attr_accessor is at instance level. So you have to use

  1   2   >