[Rails] Re: Freezing Rails 2.3.4 to application

2009-09-10 Thread Neetal Sharma
Thanks much Matt.. That worked for me , now am running in to some different issue. When i tried to run the server it says === c:/ruby/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.4/lib/acts_as_ferret.rb:267: w

[Rails] Re: problem with dynamic selects using rjs

2009-09-10 Thread Marcos Müller
Hello again, I'm going to try to explain better now... ** I'm quite beginner at rails and i'm facing a weird problem to make a two select boxes working dynamic. I have a table called conditions and this table has condition_type and condition_value. I want to put in the first select all the condit

[Rails] How to install acts_as_threaded

2009-09-10 Thread fireflyman
Hi,everyone I'm a freshman for study ROR,I was try to deal the book. When I was in chap 6,it need to install a plugin that call acts_as_threaded.But I can't deal with it. I had used gem install and ruby script/plugin install.If you know how to deal with it ,please give me a favor! --~--~-~

[Rails] Re: load semantics of initializers and files in lib folder

2009-09-10 Thread Robert Walker
Nathan Beyer wrote: > What's the problem with global state? Rails itself is full of it and > it seems a bit impractical to have no global state, or more > appropriately, state that's setup once per restart or some reload > event. What's the alternative? Sure, one could follow the trivial > example

[Rails] Re: Nesting View Folders

2009-09-10 Thread Eric
It's an aesthetic decision, so...y'know, do what you want, but it's not necessary since you're introducing complexity in having to maintain a bunch of of prepend_view_path lines everywhere. http://en.wikipedia.org/wiki/Convention_over_configuration On Sep 10, 9:22 pm, Mark Dodwell wrote: > I li

[Rails] Re: Preview a post in a new window without saving it

2009-09-10 Thread s.ross
On Sep 9, 2009, at 11:15 PM, Ram wrote: > > Hi ross, > > Thats what im doing right now. Im saving it as a Draft and rendering > the show action for the instance @post as a preview. But that breaks 2 > requirements, namely > > 1. The preview does not open in a new window.. its the same window. >

[Rails] Nesting View Folders

2009-09-10 Thread Mark Dodwell
I like to nest my view folders the same way as my resources. So, if I have: map.resources :foos do |foos| foos.resources :bars end map.resources :sums Then I'll structure my view folders like: views/ foos/ bars/ sum/ To make this work, I need a tiny little extra line of code in

[Rails] Organizing Helpers

2009-09-10 Thread Andrew Pace
I am trying to keep my code organized as a project grows larger. I am having trouble organizing helpers into a way that I like. Right now, I have helpers named after the controllers and one application helper. I am trying not to duplicate any code, so when two controller views need the same hel

[Rails] Counter cache help

2009-09-10 Thread James Englert
My :counter_cache column isn't working properly. I wouldn't normally ask about a relatively trivial issue like this but I've been banging my head on this for a bit and haven't gotten anywhere. I must be missing something simple. Please take a look: class Comments < ActiveRecord::Base belongs_t

[Rails] Re: load semantics of initializers and files in lib folder

2009-09-10 Thread Nathan Beyer
On Sep 10, 2:16 pm, Robert Walker wrote: > Nathan Beyer wrote: > > I think I've figured out the issue. The problem seems to be that in > > development, the class caching was disabled by default, so the classes > > were reloaded on every request, but the initializers aren't re-run, > > which is

[Rails] Re: Potential fix to broken session_options in Rails 2.3

2009-09-10 Thread Yves-eric Martin
スクルト神守 wrote: > hello Martin, Please forgive my terrible english. > > I tried your mokye patch, > but it didn't work well. Yes, I just found out myself the patch is only a partial solution: it worked on my simple prototype, but once integrated into my production system, it stopped working. Lik

[Rails] Re: CPU usage with 2-2-CVE-2009-3009.patch and 2.2.2

2009-09-10 Thread Jeremy Kemper
Applied. Another 2.3 point release is pending to fix Ruby 1.9 compatibility. Best, jeremy On Thu, Sep 10, 2009 at 4:11 PM, Grant Hutchins wrote: > > Someone else had the same problem and posted a ticket to Lighthouse > with a workaround patch. > > The patch completely fixes our problem. > > htt

[Rails] Re: Installing Rails problem

2009-09-10 Thread Miro Kosecek
I forgot, the system is portable Ubuntu (Pubuntu) 8.04 -- 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 ruby

[Rails] Installing Rails problem

2009-09-10 Thread Miro Kosecek
I have installed Ruby and Apache, but when tried to install Rails (sudo gem install rails --include-dependencies) I have got an error: INFO: `gem install -y` is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list ERROR: While executing gem ... (

[Rails] Re: Perhaps not the correct group...

2009-09-10 Thread heimdull
I think you almost answered your own question... Looks like you updated the color gem and now it is conflicting with something else in your application that has Color defined. I would start with a project wide search to find Color to see if there is something else that defines Color. On Sep 10,

[Rails] undefined method `get_client_info' for Mysql:Class

2009-09-10 Thread Erwin
after upgraded to Snow Leopard... (32bits arch) I re-installed the mysql gem (i386 architecture) , all gems and rails 2.3.4 testing in the console $ irb irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'mysql' => true Mysql.get_client_info NoMethodError: undefined method `

[Rails] Re: CPU usage with 2-2-CVE-2009-3009.patch and 2.2.2

2009-09-10 Thread Grant Hutchins
Someone else had the same problem and posted a ticket to Lighthouse with a workaround patch. The patch completely fixes our problem. https://rails.lighthouseapp.com/projects/8994/tickets/3181-patch-activesupportmultibyteclean-is-very-slow On Sep 10, 3:15 pm, Grant Hutchins wrote: > We have app

[Rails] Re: cannot start mongrel after Snow Leopard upgrade : Wrong Architecture !!!

2009-09-10 Thread erwin
done .. re-installed ( ruby 1.9.and 1.8.7, rails 2.3.4 and all gems) but I had to care about error in both make ruby need to install readline 6.0 in usr/local to avoid errors... thanks On 10 sep, 16:51, heimdull wrote: > uninstall/install your architecture specific gems. > > Doing some

[Rails] Construction of multiple model forms and controllers

2009-09-10 Thread explainer
I have a problem with the construction of a sequence of input forms. The model being created and edited is called a Portfolio. The portfolio contains multiple subordinate objects, such as Stock, AssetClasses, Sectors, and worker objects link StockPosition, SectorPosition, and AssetClassPosition.

[Rails] Perhaps not the correct group...

2009-09-10 Thread bearblu
But I was not sure where to go with this. I am trying to add rspec testing to a "working" application and get the following error. /Library/Ruby/Gems/1.8/gems/color-1.4.0/lib/color.rb:19: Color is not a module (TypeError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_o

[Rails] Re: multi user messaging

2009-09-10 Thread Ar Chron
Seems to me you need to track a datetime in each client session, because your 'seen' is relative to who's looking. In each session, keep the datetime used, maybe in a hidden field, because your last seen is different from my last seen (I opened the view 5 seconds after you). When your periodi

[Rails] CPU usage with 2-2-CVE-2009-3009.patch and 2.2.2

2009-09-10 Thread Grant Hutchins
We have applied the XSS vulnerability patch to the Rails 2.2.2 codebase and built our own version of the 2.2.2 gems. When we run with this patched 2.2.2, we are seeing high CPU usage which seems to be a direct result of the additional UTF-8 checking. Unfortunately it has increased CPU load so muc

[Rails] RJS and Rails 3.0

2009-09-10 Thread Daniel Lopes
I would like to know what we should expect for RJS in Rails 3.0. I love RJS and use it a lot, and see many other developers using. I know it is a controversial choice because actually RJS is not unobtrusive but for my needs, user MUST use JS. Will be great if we also have improvements in RJS area

[Rails] Re: cucumber | Then I should see "view.common.status.logged_in_as"

2009-09-10 Thread DyingToLearn
It depends on exactly what value is important to the stakeholders. If specific messages are important, then you could use a scenario outline: http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines If it is just important to display a certain message, then what you have done is fine. Just

[Rails] Re: [ANN] "gold": a script to ease git based team work

2009-09-10 Thread Robert Walker
Gaspard Bucher wrote: > I created a script to ease workflow on zena, a rails CMS > (http://zenadmin.org). Nice, thanks for contributing. Is this intended to be lighter weight substitution for a "real" Continuous Integration (CI) system? Don't most teams that need this level of collaboration use

[Rails] Re: multi user messaging

2009-09-10 Thread Matt Jones
You might be able to put the last shown message id in a hidden field returned by the call, and then pass some JS to the :url option in periodically_call_remote. --Matt Jones On Sep 9, 7:18 pm, Matt Harrison wrote: > On Wed, Sep 09, 2009 at 04:06:36PM -0700, E. Litwin wrote: > > > > If a user op

[Rails] Re: load semantics of initializers and files in lib folder

2009-09-10 Thread Robert Walker
Nathan Beyer wrote: > I think I've figured out the issue. The problem seems to be that in > development, the class caching was disabled by default, so the classes > were reloaded on every request, but the initializers aren't re-run, > which is can be rather painful. Yes, I would expect that class

[Rails] Re: cannot continue my devs, big mess with Apple Snow Leopar

2009-09-10 Thread Robert Walker
Kad Kerforn wrote: > this is the mess created by Apple ... This is just an aside, but it drives me nuts when people blame OS vendors (Apple or anyone else) for "stopping" their development. As a developer it is YOUR responsibility to make sure you have a stable development platform. Nobody for

[Rails] Re: Freezing Rails 2.3.4 to application

2009-09-10 Thread Matt Jones
The first couple warnings are related to the 2.1 era gem freezer, which didn't unpack gemspecs. The rake task listed in the error should fix that. The other error appears to be from activescaffold trying to override part of ActionView; I'd guess that you'll need to upgrade activescaffold. --Matt

[Rails] Re: autoincrement for non-id column

2009-09-10 Thread Matt Jones
On Sep 10, 7:03 am, adrianopol wrote: > > There's even a Rails plugin called acts_as_versioned > > acts_as_versioned creates a new table, I prefer to avoid this in my > situation. > > > I did things this way for about 8 years. > > This is very helpful to work with low-level things for some time

[Rails] Re: problems with habtm

2009-09-10 Thread Marnen Laibow-Koser
Paulo Geyer wrote: > i didn't create the model CategoriesEmpresas, You don't need that if you're using habtm. You only need the join model if you're using :through. > and the table had the > "id" field, that was the problem Yes, that apparently gets in the way. > just another case of someon

[Rails] Re: undefined method `protect_against_forgery?'

2009-09-10 Thread Jeff
On Sep 10, 8:56 am, sunnet wrote: > When I use plugin 'railstree' (http://www.hashcode.eti.br/?p=91)  as > following code: > node = Node.new :label => menu_item.name, >               :link_to_remote => { >                                                  :base => self, >                          

[Rails] Re: send attached tar.gz file on rails email

2009-09-10 Thread Marnen Laibow-Koser
Colin Law wrote: > 2009/9/10 Arul hari : >> >> How to send attached tar.gz file on ruby mail sending. If anyone aware >> already, please let me know. >> > > Better to use pastie (http://pastie.org/) and post url here. I think the OP was asking how to send a tarball attachment from a Rails app..

[Rails] Re: problem with dynamic selects using rjs

2009-09-10 Thread Alpha Blue
Marcos, You need to provide some code for the controller, the model, and the view where you are having the issue. Without any code, no one can adequately respond. Thanks. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this messa

[Rails] url with some%Fvalue treated differently than some_value

2009-09-10 Thread davetron5000
My setup: passenger via Apache rails 2.3.2 RailsBaseURI /scala_tour going to http://www.naildrivin5.com/scala_tour works great Someone posted a link to http://www.naildrivin5.com/scala%5Ftour and I get this in my log: ActionController::RoutingError (No route matches "/scala%5Ftour" with {:met

[Rails] Re: cannot continue my devs, big mess with Apple Snow Leopard !

2009-09-10 Thread Rick DeNatale
On Thu, Sep 10, 2009 at 11:45 AM, erwin wrote: > > EFI32 means even if the architecture of the computer is 64bit (as is > my MacBook ) you cannot boot 64bits kernel/extensions > I don't really care about that...  I reinstalled the old 32bit i386 > mySQL version Although the 32-bit kernel is run o

[Rails] Re: problems with habtm

2009-09-10 Thread Paulo Geyer
i didn't create the model CategoriesEmpresas, and the table had the "id" field, that was the problem just another case of someone trying to use the framework without reading carefully the documentation thanks Eric! On Sep 9, 4:55 pm, Eric wrote: > it looks all wrong to me, and overconfigured to

[Rails] Re: sql "in" query using active record

2009-09-10 Thread Marnen Laibow-Koser
AppleII717 wrote: > Thanks, you pointed my in the right direction. Not many examples > using :joins. I ended up with > > Stage.find(:all, :joins => :job, :conditions => ["jobs.status = ? and > stages.name = ?","Active","Application"]) You may be able to rewrite this using the hash syntax for :co

[Rails] Re: Potential fix to broken session_options in Rails 2.3

2009-09-10 Thread スクルト神守
hello Martin, Please forgive my terrible english. I tried your mokye patch, but it didn't work well. I tried like next, -- class Mobile::BaseController < ApplicationController before_filter :cookie_only_off protected def cookie_only_off RAILS_DEFAULT_LOGGER.info "call set optiion"

[Rails] Re: chart in rails

2009-09-10 Thread Rails ROR
hi I have worked on few charts using Open Flash successfully. please follow the tutorial for open flash chart using pull monkey. You need to give your controller name/ method name in the parameter ie in the first method. Second method contains the actual code for a graph. If you don't get

[Rails] Re: autoincrement for non-id column

2009-09-10 Thread Marnen Laibow-Koser
adrianopol wrote: >> There's even a Rails plugin called acts_as_versioned > acts_as_versioned creates a new table, I prefer to avoid this in my > situation. I didn't realize that acts_as_versioned needs a new table. However: 1. There's no reason to avoid adding tables if that's what's best to m

[Rails] Re: Route not generated, what have I missed? ** Solved **

2009-09-10 Thread brianp
Hey, Create is exactly what the form goes to now which is why I don't get why it hasn't created the word/2/votes route as create (post) is the desired behavior. As well I've tried using word_votes_path(word) and I actually receive this generated output: ** Just found my problem, I was using map.

[Rails] Re: load semantics of initializers and files in lib folder

2009-09-10 Thread Nathan Beyer
On Sep 10, 1:01 am, Nathan Beyer wrote: > I've changed the subject, as I think I'm honing in on the issues I'm > running into -- the loading semantics of files in the initializers > folder and files in the lib folder. > > Is there anything to keep in mind when referencing classes in the lib > f

[Rails] Re: Tagging recommendation - acts_as_taggable_on_steroids best?

2009-09-10 Thread Max Williams
oh, that's cool, so it just uses an optional extra field then. That's very easy to integrate with what we have already (as is a_a_t_o_s). cheers -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: cannot continue my devs, big mess with Apple Snow Leopard !

2009-09-10 Thread erwin
EFI32 means even if the architecture of the computer is 64bit (as is my MacBook ) you cannot boot 64bits kernel/extensions I don't really care about that... I reinstalled the old 32bit i386 mySQL version my big concern is about compiling with the Snow Leopard XTools (ex: installing Ruby 1.9) or

[Rails] Re: Tagging recommendation - acts_as_taggable_on_steroids best?

2009-09-10 Thread Philip Hallstrom
> >> Hi >> >> I agree with phillip suggstion. >> >> @max, >> Don't go with steroids as it has limitations for multiple taggings >> like >> ( >> tags, skills, interests ) that were extended in acts_as_taggable_on >> >> Sandip >> >> -- >> Ruby on Rails Developer >> http://funonrails.wordpress.com

[Rails] Re: replace html tag

2009-09-10 Thread prashanth hiremath
Thank u da I solved ya m just beginner in ruby on rails.I will work hard to learn Regards prashanth On Thu, Sep 10, 2009 at 7:37 PM, Ar Chron wrote: > > > > > doc1=x.gsub(/<(\/?)li>/,'') > > doc2=Hpricot(doc1.to_s) > > doc1 is only a string, so: > A) doc1 is misleading in this context and I'd us

[Rails] Re: cannot start mongrel after Snow Leopard upgrade : Wrong Architecture !!!

2009-09-10 Thread heimdull
uninstall/install your architecture specific gems. Doing something like sudo gem update --system; sudo gem pristine --all --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this g

[Rails] cucumber | Then I should see "view.common.status.logged_in_as"

2009-09-10 Thread Rafael
Hi guys, how could I run this scenarion for each language? Is it suitable anyway? I slightly modified the webrat steps: Then /^I should see "([^\"]*)"$/ do |text| response.should contain(I18n.t(text.to_sym)) end Does anybody have a hint for me? Thanks a lot! Rafael --~--~-~--~

[Rails] Re: Preview a post in a new window without saving it

2009-09-10 Thread Ar Chron
Hmm... haven't tried this but: 1. add a div, usually hidden, to your 'new' form, 2. on a 'preview' request, pass the content back in the params to the new method 3. if params[:preview_data] (or whatever), have that content rendered in the div on the 'new' form -- no preview content means the di

[Rails] Re: Already initialized constant in Rails 2.3.4

2009-09-10 Thread Jeffrey L. Taylor
Links to patches here: http://www.rorsecurity.info/journal/2009/9/4/two-vulnerabilities-fixed-in-rails-234.html Quoting Jeffrey L. Taylor : > > I worked around the problem by applying the patches to 2.3.3. > > Jeffrey > > Quoting chris.drappier : > > > > I'm having the same problem.. > > > >

[Rails] Re: Ruby for google database: Big Table

2009-09-10 Thread Ar Chron
Silly Rabbit, google 'rails big table' first. -- 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

[Rails] Re: replace html tag

2009-09-10 Thread Ar Chron
> > doc1=x.gsub(/<(\/?)li>/,'') > doc2=Hpricot(doc1.to_s) doc1 is only a string, so: A) doc1 is misleading in this context and I'd use a different variable name, and B) doc1.to_s is superfluous processing in the Hpricot call If you want to process all the 'Kolkata's, then don't do the if/end.

[Rails] Re: cannot continue my devs, big mess with Apple Snow Leopard !

2009-09-10 Thread Phillip
Don't know about EFI32. I get the same exact response on my early 2007 MacPro with Snow. Did you: sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with- mysql-config=/your_path_to/usr/local/mysql/bin/mysql_config when installing mysql? --~--~-~--~~~---~--~

[Rails] undefined method `protect_against_forgery?'

2009-09-10 Thread sunnet
When I use plugin 'railstree' (http://www.hashcode.eti.br/?p=91) as following code: node = Node.new :label => menu_item.name, :link_to_remote => { :base => self, :update => "container",

[Rails] Re: sql "in" query using active record

2009-09-10 Thread AppleII717
Thanks, you pointed my in the right direction. Not many examples using :joins. I ended up with Stage.find(:all, :joins => :job, :conditions => ["jobs.status = ? and stages.name = ?","Active","Application"]) Which is my real life models where Jobs have many Stages. Steve On Sep 10, 6:31 am, Fre

[Rails] Re: send attached tar.gz file on rails email

2009-09-10 Thread Colin Law
2009/9/10 Arul hari : > > How to send attached tar.gz file on ruby mail sending. If anyone aware > already, please let me know. > Better to use pastie (http://pastie.org/) and post url here. Colin --~--~-~--~~~---~--~~ You received this message because you are su

[Rails] send attached tar.gz file on rails email

2009-09-10 Thread Arul hari
How to send attached tar.gz file on ruby mail sending. If anyone aware already, please let me know. Regards, S.Vellingiri. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] cannot start mongrel after Snow Leopard upgrade : Wrong Architecture !!!

2009-09-10 Thread Erwin
(MacBook Core 2 Duo.. but 32-bits kernel... upgraded to SL) Rails 2.3.4 / Ruby 1.8.7 fine with Webrick Booting WEBrick => Rails 2.3.4 application starting on http://0.0.0.0:3000 but trying to start Mongrel ( btw should be the default in dev mode when installed ?) mongrel_rails start -d /usr/lo

[Rails] Re: sql "in" query using active record

2009-09-10 Thread Frederick Cheung
On Sep 10, 11:05 am, AppleII717 wrote: > I'm trying to convert a non-sql application (4D or 4th Dimension) to > rails. Got all the CRUD stuff down, but I'm running into problem in > generating reports. 4D makes heavy use of Sets and Selections, which > are really just an array of record numbers

[Rails] Freezing Rails 2.3.4 to application

2009-09-10 Thread Neetal Sharma
Hi Everyone I am trying to update my Rails 2.1.2 to Rails 2.3.4. I have upgraded to Rails 2.3.4 and freezed the Rails 2.3.4 to my application. But when am trying to run the server , am getting this error config.gem: Unpacked gem ClothRed in vendor/gems has no specification file. Run 'rake gem

[Rails] Re: autoincrement for non-id column

2009-09-10 Thread adrianopol
> There's even a Rails plugin called acts_as_versioned acts_as_versioned creates a new table, I prefer to avoid this in my situation. > I did things this way for about 8 years. This is very helpful to work with low-level things for some time) > Then why are you making statements like this on the

[Rails] sql "in" query using active record

2009-09-10 Thread AppleII717
I'm trying to convert a non-sql application (4D or 4th Dimension) to rails. Got all the CRUD stuff down, but I'm running into problem in generating reports. 4D makes heavy use of Sets and Selections, which are really just an array of record numbers that can be used to quickly restore a query. Thos

[Rails] Re: Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch

2009-09-10 Thread Jonathan Fagan
Hi, Thanks for that, but I am still getting the same error. Not sure where to go with this On Thu, Sep 10, 2009 at 10:28 AM, Sandip Ransing wrote: > Try this out > > On Thu, Sep 10, 2009 at 1:49 PM, codex1 wrote: > >> >> Hi, >> >> I have been trying to do this for a few days now and cannot fig

[Rails] Re: Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch

2009-09-10 Thread Jonathan Fagan
Thanks, but still getting the same error. On Thu, Sep 10, 2009 at 10:28 AM, Sandip Ransing wrote: > Try this out > > On Thu, Sep 10, 2009 at 1:49 PM, codex1 wrote: > >> >> Hi, >> >> I have been trying to do this for a few days now and cannot figure it >> out. I would be very grateful is anyone

[Rails] Re: Tagging recommendation - acts_as_taggable_on_steroids best?

2009-09-10 Thread Max Williams
Sandip Ransing wrote: > Hi > > I agree with phillip suggstion. > > @max, > Don't go with steroids as it has limitations for multiple taggings like > ( > tags, skills, interests ) that were extended in acts_as_taggable_on > > Sandip > > -- > Ruby on Rails Developer > http://funonrails.wordpres

[Rails] Re: Tagging recommendation - acts_as_taggable_on_steroids best?

2009-09-10 Thread Sandip Ransing
Hi I agree with phillip suggstion. @max, Don't go with steroids as it has limitations for multiple taggings like ( tags, skills, interests ) that were extended in acts_as_taggable_on Sandip -- Ruby on Rails Developer http://funonrails.wordpress.com www.joshsoftware.com --~--~-~--~

[Rails] Re: Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch

2009-09-10 Thread Sandip Ransing
Try this out On Thu, Sep 10, 2009 at 1:49 PM, codex1 wrote: > > Hi, > > I have been trying to do this for a few days now and cannot figure it > out. I would be very grateful is anyone can help me > > I am trying to upload an attachment to AWS, S3 using paperclip, > however every time I keep gett

[Rails] Re: hpricot search condition

2009-09-10 Thread prashanth hiremath
K i wont post again sorry can u help me to incremant blah a b blah2 c d (doc/"div").each do |dv| this_h3 = (dv/"h3") if this_h3.inner_html == "blah2" (dv/"li").each do |li| puts li.inner_html end end end this is ur code i wanted to check for all inner_text tags ex: "blah2"

[Rails] Re: chart in rails

2009-09-10 Thread Abhinav Saxena
You have already posted a very similar question, please don't do that. I have not used open flash chart, and I guess you have followed all the instructions given on the github page correctly (including plugin installation: see in your vendor/plugins directory to check if it is installed properly)

[Rails] Re: [Rspec] Using Mocha results in uninitialized constant, using a 'fix' breaks RSpec output

2009-09-10 Thread James Mead
2009/9/9 Lb2007 : > After installation of Mocha (0.9.7), running "script/spec spec" > results in a "`const_missing': uninitialized constant > Test::Unit::TestResult::TestResultFailureSupport (NameError)" error. > (As shown here; http://codepad.org/mTqztjwt ) > I'm running Ruby 1.8.6 with Rails 2.3

[Rails] Re: after upgrade to Snow Leopard how to upgrade MySQL to version 5.1 ?

2009-09-10 Thread Conrad Taylor
On Wed, Sep 9, 2009 at 3:22 PM, Erwin wrote: > > Finally I could solve the mess in my dev environment by reverting the > MySQL folder to its original version (before upgrade) so I run > Leopard but no upgrade of MySQL yet ... > > present versions (all 32-bits as I cannot start kernel 64.. ) >

[Rails] Re: Route not generated, what have I missed?

2009-09-10 Thread Abhinav Saxena
Hi Brian, You can modify your code like this as well: <% form_tag word_votes_path(word) do %> # note word as argument <%= submit_tag 'shove it' %> <% end %> I am not aware of simply rails demo, but in general, word/2/votes corresponds to index (get) or crea

[Rails] Re: Route not generated, what have I missed?

2009-09-10 Thread brianp
Brilliant! I don't know why but what you said just made it click for me. I changed my form to: <% form_tag word_votes_path :word_id => word.id do %> <%= submit_tag 'shove it' %> <% end %> The votes get created and the counter_caches work like expected. The o

[Rails] [ANN] "gold": a script to ease git based team work

2009-09-10 Thread Gaspard Bucher
Hi list ! I created a script to ease workflow on zena, a rails CMS (http://zenadmin.org). The workflow involves developers and reviewers (can be the same people): 1. each developer has his own fork (on github or another git server) 2. he creates a branch per feature 3. a reviewer looks at the c

[Rails] Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch

2009-09-10 Thread codex1
Hi, I have been trying to do this for a few days now and cannot figure it out. I would be very grateful is anyone can help me I am trying to upload an attachment to AWS, S3 using paperclip, however every time I keep getting this error: ActiveRecord::AssociationTypeMismatch in ProjectController

[Rails] chart in rails

2009-09-10 Thread Soutom
Hi All i am trying to use Open Flash Chart i tried this as instracted in this link http://github.com/pullmonkey/open_flash_chart/tree/master bat at finally i got the following error undefined method `open_flash_chart_object' for # At presnet i cant understand what to do. please help me to solve th

[Rails] Re: hpricot search condition

2009-09-10 Thread Colin Law
2009/9/10 prashanth hiremath : > > Thank u i have done what u told using gsub operator i replaces the tags to > the form as u told,but problem is that > > if >     doc = Hpricot(open('Delhi.txt')) >   x=doc.to_s >   doc1=x.gsub(/<(\/?)li>/,'') > >   puts doc1 >

[Rails] Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!

2009-09-10 Thread codex1
Hi, I have been trying to do this for a few days now and cannot figure it out. I would be very grateful is anyone can help me I am trying to upload an attachment to AWS, S3 using paperclip, however every time I keep getting this error: ActiveRecord::AssociationTypeMismatch in ProjectController

[Rails] Re: replace html tag

2009-09-10 Thread prashanth hiremath
Last prob i facing is incrementing of inner_text between span tags i will explain the code I have delhi.txt Central Kolkata Eden Gardens (one of the most famous cricket stadiums in the world), Akashwani Bhavan, All India Radio building Indoor Stadium Fort William, the massive and impregnable Br

[Rails] Re: Ruby on Rails for Non-Relational database

2009-09-10 Thread Abhinav Saxena
Of course you can use them. If you are using CouchDB, then there exists ActiveCouch (http://github.com/arunthampi/activecouch/tree/master) which will give you ActiveRecord like interface. If you are planning to use some other DB, you can help community like ActiveCouch guys by extracting your code

[Rails] problem with dynamic selects using rjs

2009-09-10 Thread Marcos Müller
Hello everybody, This is a simple problem and i found a lot of resources on the internet but i try for different ways and none of them worked yet. I have the normal problem with the "states and cities" selects. But the problem is that when i select the state the on_change method is called and the

[Rails] Re: replace html tag

2009-09-10 Thread prashanth hiremath
Sure i did using gsub operator and then i again opened using hpricot like this doc = Hpricot(open('Delhi.txt')) x=doc.to_s doc1=x.gsub(/<(\/?)li>/,'') doc2=Hpricot(doc1.to_s) doc2.search('li').each do |z| puts z.inner_text end On Thu,

[Rails] Re: after upgrade to Snow Leopard how to upgrade MySQL to version 5.1 ?

2009-09-10 Thread Frederick Cheung
On Sep 9, 11:22 pm, Erwin wrote: > Finally I could solve the mess in my dev environment by reverting the > MySQL folder to its original version (before upgrade)  so I run > Leopard but no upgrade of MySQL yet  ... > > present versions  (all 32-bits as I cannot start kernel 64.. ) Not very rele

[Rails] Re: Route not generated, what have I missed?

2009-09-10 Thread Abhinav Saxena
word_votes_url needs word id to generate the url, therefore {:action=>"index", :controller=>"votes"} alone is not sufficient. You need to pass word id as well. See rake routes for all the paths/url generated and ids they need. Thanks, Abhinav -- अभिनव http://twitter.com/abhinav On Thu, Sep

[Rails] Re: Ruby on Rails for Non-Relational database

2009-09-10 Thread Frederick Cheung
On Sep 10, 7:55 am, Pankesh Patel wrote: > hi , >     Is  it possible to use  Non-relatiional Datbase  with Ruby  on Rails > for  Web app ? > -Pankesh Well ActiveRecord won't support it but that doesn't stop you from using the rest of rails with it (eg I'm working on an app that uses couchdb f

[Rails] Ruby on Rails for Non-Relational database

2009-09-10 Thread Pankesh Patel
hi , Is it possible to use Non-relatiional Datbase with Ruby on Rails for Web app ? -Pankesh --~--~-~--~~~---~--~~ 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 r

[Rails] Ruby for google database: Big Table

2009-09-10 Thread Pankesh
Hi , I just want to Know that Ruby on Rails support non -relational Database ? I want to use "Big Table" as backend for my web application. kindly help me . Thanks in advance. -Pankesh --~--~-~--~~~---~--~~ You received this message because you ar

[Rails] Question about using ".build" in association with has_one and belongs_to

2009-09-10 Thread ct9a
hi, guys, I have the following db tables: 1) Addresses - represents an address (ie line 1, line 2, suburb,postcode, state and country) 2) Accounts - represents a user account. Will have a foreign key, "address_id" 3) Warehouses - represents a warehouse. Will have a foreign key, "address_id" Eac

[Rails] My Rails Site (www.babyphonedirectory.com)

2009-09-10 Thread leverd
Hey All, I'm a novice rails developer and I just published my first rails site. It's a social networking site where friends can share their cell phone numbers. It's 100% rails and hosted by ocs solutions. Check out the site and let me know what you think. I'm new to rails development and web de

[Rails] ActiveResource - Two simple questions

2009-09-10 Thread Samuel Richardson
I'm struggling a bit with implementing ActiveResource on a custom RESTful API. Firstly, I can't seem to disable the transforms it does when it parses the XML. For example "CamelCase" gets rendered as camel_case, likewise underscores get converted to dashes. The docs page for ActiveResource mentio

[Rails] Rails 2.3.4 ActiveRecord association problem

2009-09-10 Thread Paul Christmann
Upgraded our app from Rails 2.2.2 to 2.3.4, and I'm now encountering an error when adding a child to a parent. Top of the stack: wrong number of arguments (1 for 0) /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ associations/has_many_association.rb:61:in `save' /Library/Ruby/G

[Rails] Re: Snow Leopard and raspell

2009-09-10 Thread Frederick Cheung
On Sep 10, 4:12 am, Jason Fox wrote: > I'm having trouble with raspell after upgrading to Snow Leopard.  When I > start up the console in one of my apps that uses raspell I receive the > following error message: > > Loading development environment (Rails 2.1.0) > dyld: lazy symbol binding faile

[Rails] Re: Preview a post in a new window without saving it

2009-09-10 Thread Abhinav Saxena
As I see it, there are two ways of doing it: 1. As previously suggested, save it , but let the state be "preview", after a user saves it state can change to "draft". Essentially means as soon as user clicks on preview, you create in db and then you have an id 2. Othe way (I am not very sure abou

[Rails] Re: replace html tag

2009-09-10 Thread Abhinav Saxena
Can you let us know how you did it using Hpricot? -- अभिनव http://twitter.com/abhinav On Thu, Sep 10, 2009 at 12:41 PM, prashanth hiremath wrote: > Thax for reply i did using hpricot > > > On Thu, Sep 10, 2009 at 12:33 PM, Abhinav Saxena > wrote: >> >> I don't know Hpricot, but what you can

[Rails] Route not generated, what have I missed?

2009-09-10 Thread brianp
Hey Guys, I'm basing this off of the book Simply Rails 2 by Patrick Lenz. I've got my word model: # word.rb has_many :votes my vote mode; # vote.rb belongs_to :word, :counter_cache => true my routes # routes.rb map.resources :words, :has_many => :votes Then my problem. In my view I'm trying t

[Rails] Re: replace html tag

2009-09-10 Thread prashanth hiremath
Thax for reply i did using hpricot On Thu, Sep 10, 2009 at 12:33 PM, Abhinav Saxena wrote: > > I don't know Hpricot, but what you can do is: first open the file and > do a gsub on the content, save it in a different/same file, and then > open it using Hpricot. Just to warn you, won't be very eff

[Rails] Re: Preview a post in a new window without saving it

2009-09-10 Thread Ram
Hi Abhinav, I was looking at this angle in the beginning but what would the "url_path" be? I basically need the resource's show method but that is a member method and the path is incomplete without a model id in the parameters. However, the post is not saved and does not have an id yet. Is there

[Rails] Re: replace html tag

2009-09-10 Thread Abhinav Saxena
I don't know Hpricot, but what you can do is: first open the file and do a gsub on the content, save it in a different/same file, and then open it using Hpricot. Just to warn you, won't be very efficient if files are huge or there are lot many files you want to process. I think, there must be som

[Rails] Re: add_index fails for composite index

2009-09-10 Thread Gokul Janga
Found the problem !! I had to uninstall the Less gem (less-1.1.12) . rake db:migration --trace gave me the following stack - wrong number of arguments (1 for 0) /usr/lib/ruby/gems/1.8/gems/less-1.1.12/lib/ext.rb:60:in `inspect' /usr/lib/ruby/gems/1.8/gems/less-1.1.12/lib/ext.rb:60:in `send' /us

  1   2   >