[Rails] Re: alert with 3 button

2012-01-13 Thread Joachim Cheng
Hi Javier, I think I don't use colorbox now.. so, do you know to use jQuery Impromptu?? http://trentrichardson.com/Impromptu/index.php -- 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 t

[Rails] Re: has_many :through => has_many

2012-01-13 Thread Fritz Rodriguez
Hello All This is my first time on ruby-forum so pardon if this is not posted correctly. I am having a very similar issue regarding has_many through has_many. A logged user can create a work order and associated fields in models name alias and sub_tasks. I am using active_admin and an admin use

[Rails] Re: Function cost minimization

2012-01-13 Thread Robert Walker
Rodrigo Ruiz wrote in post #1040810: > The problem is that the function I'm trying to minimize is a lot more > complicated (so is its derivative), so I wanted a function that could do > the minimization for me rather than implementing one myself I thought it might be something like that. Sorry I d

[Rails] Re: Function cost minimization

2012-01-13 Thread Rodrigo Ruiz
The problem is that the function I'm trying to minimize is a lot more complicated (so is its derivative), so I wanted a function that could do the minimization for me rather than implementing one myself On Friday, January 13, 2012, Robert Walker wrote: > Rodrigo Ruiz wrote in post #1040708: >> I

[Rails] has many relation - destroy troubles

2012-01-13 Thread Douglas B.
Hello, Rookie here ... learning rails and enjoying it ... having a bit-o-trouble with has many in the following scenario: class Party < ActiveRecord::Base has_many :target_associations, :foreign_key => 'source_party_id', :class_name => 'PartyAssociation',

[Rails] Re: Roll my own Role based permission or use CanCan Gem?

2012-01-13 Thread tmueller
Hi Don, Thanks for the write-up on CanCan. I'm currently trying out declarative_authorization as I want to have the role info be accessible in my models. On Jan 13, 8:47 am, Don wrote: > I'm fairly new to the Rails community and recently faced a similar > situation.  First from what you describe

Re: [Rails] Re: keep-alive no working on dynamic content.

2012-01-13 Thread Hassan Schroeder
On Fri, Jan 13, 2012 at 11:44 AM, Philip T. wrote: > Friendly in here isn't it. > I'm new to the project and the language, and stack in general. Apologies > if this is an annoyance, but here I am. Newness isn't cause for annoyance, but it's impossible for anyone to offer reasonable help without

[Rails] Re: passenger does not see gems in vendor/cache

2012-01-13 Thread Steven F.
By the way... running "bundle install --path vendor/cache" on the development system, then re-deploying did not fix the problem -- the deploy still failed at the assets compile step. To get it to deploy I have to shell into the server, cd to "shared/cached-copy" and then run "bundle pack" to in

[Rails] Re: Function cost minimization

2012-01-13 Thread Robert Walker
Rodrigo Ruiz wrote in post #1040708: > I have to do the minimization of a cost function based on parameters > (gradient descent). > > Is there a decent ruby gem (that works with rails) to do this? >From what I can tell "gradient descent" is just math: The Wiki page I found had a computational sol

[Rails] Ruby installation error

2012-01-13 Thread Kamal
Hi, I am a newbie to Ruby and I have been installing ruby 1.9.2 following this link. http://toranbillups.com/blog/archive/2010/09/01/How-to-install-Rails-3.0-and-Ruby-1.9.2-on-Ubuntu I am stuck at 'rvm install ruby-1.9.2' I get this error: error: Error running 'make ', please check /home/coder/.rv

[Rails] Rails Developers Needed

2012-01-13 Thread Andrews
We have a very high visibility project for a huge Fortune 500 Media Company. They need at least 3years experience with Ruby on Rails and the salary range is completely open. Email me at kandr...@fortitudesys.com for any inquiries. Best Regards, Kevin -- You received this message because you are

[Rails] Re: passenger does not see gems in vendor/cache

2012-01-13 Thread Steven F.
I am having the same issue(s). It appears that bundle puts the gems into vendor/cache, but the application (or capistrano during install?) is not looking for them there. The installation fails, but examining shared/cached-copy/vendor/cache on the server (deployment destination) shows the "missing"

Re: [Rails] How should javascript assets be included? (was Re: RailsCasts)

2012-01-13 Thread Javier Quarite
On Fri, Jan 13, 2012 at 2:43 PM, djangst wrote: > I find it confusing, because the language in application.js indicates > that separate javascript files need only be included in that directory > and they'll automatically be compiled, while other sources say files > must be specifically required.

[Rails] Re: How should javascript assets be included? (was Re: RailsCasts)

2012-01-13 Thread djangst
And I'm also interpreting "(don't) add code directly here" as not to uncomment require_tree, because isn't uncommenting equivalent to adding? But again other sources say to use require_tree to include separate files in that directory. On Jan 13, 2:43 pm, djangst wrote: > I find it confusing, bec

[Rails] Re: keep-alive no working on dynamic content.

2012-01-13 Thread Philip T.
Friendly in here isn't it. Fedora 12. Apache 2, not sure on ruby and rails versions until Monday. Passenger (Monday for version) apache module links to RoR app. I'm new to the project and the language, and stack in general. Apologies if this is an annoyance, but here I am. Thanks for your resp

[Rails] How should javascript assets be included? (was Re: RailsCasts)

2012-01-13 Thread djangst
I find it confusing, because the language in application.js indicates that separate javascript files need only be included in that directory and they'll automatically be compiled, while other sources say files must be specifically required. In fact application.js says "not advisable to add code di

[Rails] Re: Team viewer for install

2012-01-13 Thread Mathew S.
> If you still want to use Aptana, you will need to change the shebang > (google for what is it) to "#!/usr/bin/env ruby" (without quotes). > Also ensure gems are installed with --env-shebang Well I tried to get redcar to work and no luck with that either watch should I do/use for this? -- Post

[Rails] Re: Team viewer for install

2012-01-13 Thread Luis Lavena
On Jan 13, 2:49 pm, "Mathew S." wrote: > This is what I get when I open up Aptana and make a new project: > If wasn't for the last 2 messages, the mention that you type this in the Aptana shell and not a normal command prompt would have been impossible to determine the issue. Aptana uses a MSYS

Re: [Rails] Re: RailsCasts

2012-01-13 Thread Walter Lee Davis
On Jan 13, 2012, at 2:00 PM, Linus Pettersson wrote: > That is correct. The .js (or .js.coffee if using coffeescript) files should > be in app/assets/javascript/. > > You could use require tree which is specified from the beginning and will > include all javascript files. I do prefer to requir

Re: [Rails] Re: RailsCasts

2012-01-13 Thread Linus Pettersson
That is correct. The .js (or .js.coffee if using coffeescript) files should be in app/assets/javascript/. You could use require tree which is specified from the beginning and will include all javascript files. I do prefer to require each file separately though as it gives me more control. Chee

[Rails] Re: Team viewer for install

2012-01-13 Thread Mathew S.
This is what I get when I open up Aptana and make a new project: Owner@OWNER-PC ~/My Documents/Aptana Studio 3 Workspace/project $ rails new . sh: /c/RailsInstaller/Ruby1.9.2/bin/rails: C:/Projects/railsinstaller/stage/Ruby1.9.2/bin/ruby.exe: bad interpreter : No such file or directory -- Po

Re: [Rails] Re: RailsCasts

2012-01-13 Thread Tom Allison
So I could put my code into another file "foo.js" and 'require' it in application.js. I believe these other .js files would be in the assets directory to be picked up? On 1/12/12 11:57 AM, Linus Pettersson wrote: As it says in application.js: " // This is a manifest file that'll be compiled

[Rails] Re: Roll my own Role based permission or use CanCan Gem?

2012-01-13 Thread Don
I'm fairly new to the Rails community and recently faced a similar situation. First from what you describe, CanCan will most certainly provide the functionality you desire. Secondly, there is a nice screencast at Railscasts.com that provides a good introduction, however some of processes in

Re: [Rails] Re: listmania - anaylsing multiple lists in a method

2012-01-13 Thread Dave Aronson
On Fri, Jan 13, 2012 at 07:21, bingo bob wrote: > User has_many names > Name belongs_to User So the two 'harry's in your list are two different objects? Is that a necessary part of your model? -Dave -- Dave Aronson, President, Dave Aronson Software Engineering and Training Ruby on Rails Free

Re: [Rails] keep-alive no working on dynamic content.

2012-01-13 Thread Hassan Schroeder
On Fri, Jan 13, 2012 at 5:49 AM, Philip T. wrote: > I have RoR app. It needs to use keepalive in its responses. It sits on > apache. I've configured apache and its serving static files from apache > with keepalive working, but dynamic pages generated by the RoR app are > closing the connection (t

[Rails] Re: listmania - anaylsing multiple lists in a method

2012-01-13 Thread bingo bob
Is my proposed method (while probably not the most elegant) a reasonable way of attacking the problem? -- 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 rubyo

[Rails] Re: Paperclip

2012-01-13 Thread Karthikeyan
I fixed it using old ways, changed migration file as shown class AddImageColumnsToPicture < ActiveRecord::Migration def self.up add_column :pictures, :image_file_name,:string add_column :pictures, :image_content_type, :string add_column :pictures, :image_file_size,

[Rails] Re: Paperclip

2012-01-13 Thread Karthikeyan
Hello Jordan, I am not quiet sure. This is how my model looks like class Picture < ActiveRecord::Base has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" },

[Rails] Function cost minimization

2012-01-13 Thread Rodrigo Ruiz
I have to do the minimization of a cost function based on parameters (gradient descent). Is there a decent ruby gem (that works with rails) to do this? Thanks in advance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this gr

[Rails] Re: spork/guard/rspec now disregarding filter tags for examples

2012-01-13 Thread Stan Kaufman
On Jan 11, 12:46 pm, Stan Kaufman wrote: > > Hmm...looks like this is a spork vs rspec problem; the behavior occurs > without involving guard: Turns out that this is an rspec 2.8.x issue. See the discussion here: https://github.com/sporkrb/spork/issues/166 The simple workaround is to add --tag

Re: [Rails] Paperclip

2012-01-13 Thread Jordan Miller
did you add the definitions and functions to your model file? jordan On Jan 13, 2012, at 9:27 AM, Walter Lee Davis wrote: > > On Jan 13, 2012, at 4:44 AM, Karthikeyan wrote: > >> Hello people, >> >> I installed paperclip gem with these following lines in gem file >> >> gem 'rmagick' >> gem "p

Re: [Rails] Paperclip

2012-01-13 Thread Walter Lee Davis
On Jan 13, 2012, at 4:44 AM, Karthikeyan wrote: > Hello people, > > I installed paperclip gem with these following lines in gem file > > gem 'rmagick' > gem "paperclip", "~> 2.0" > gem 'aws-s3' > > I am using amazon S3. > > the problem came when I ran the migration which had the following > m

[Rails] keep-alive no working on dynamic content.

2012-01-13 Thread Philip T.
Hi. I have RoR app. It needs to use keepalive in its responses. It sits on apache. I've configured apache and its serving static files from apache with keepalive working, but dynamic pages generated by the RoR app are closing the connection (tested thoroughly, and the response headers also confirm

[Rails] Re: listmania - anaylsing multiple lists in a method

2012-01-13 Thread bingo bob
Hi Colin, Sorry - just seen your question as I was writing my method above... User has_many names Name belongs_to User -- 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, se

[Rails] Re: listmania - anaylsing multiple lists in a method

2012-01-13 Thread bingo bob
Actually, I'll try for the instance method for the male version in name.rb.. def find_similar_male # get all users users = User.all # get all male names names = Name.male # get the similar names similar_names = [] # loop users... users.each do |user| # loop names user.nam

Re: [Rails] listmania - anaylsing multiple lists in a method

2012-01-13 Thread Colin Law
On 13 January 2012 11:49, bingo bob wrote: > Hoping someone might be able to throw me a few clues on this one. > > I'm working with lists of names a User (current_user) manages lists of > names, some male some female (scoped on m or f in gender), it's all set > up such that I can do things like th

[Rails] Re: listmania - anaylsing multiple lists in a method

2012-01-13 Thread bingo bob
Actually - thinking it through this is an instance method I believe, acts on an instance of a name. Kind of talking out loud here. -- 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 thi

[Rails] listmania - anaylsing multiple lists in a method

2012-01-13 Thread bingo bob
Hoping someone might be able to throw me a few clues on this one. I'm working with lists of names a User (current_user) manages lists of names, some male some female (scoped on m or f in gender), it's all set up such that I can do things like this - all working out fine. current_user.names.male (

[Rails] Re: ActiveRecord: ar-each_model

2012-01-13 Thread tvw
On 12 Jan., 23:29, Matt Jones wrote: > On Jan 10, 7:18 pm, tvw wrote: > > > Hi, > > > today I went into a problem, when I had to iterate over a big result > > set. ActiveRecord produces a huge array of model instances, which > > consumed 1GB of memory on my machine. A comparable perl DBI script

[Rails] Paperclip

2012-01-13 Thread Karthikeyan
Hello people, I installed paperclip gem with these following lines in gem file gem 'rmagick' gem "paperclip", "~> 2.0" gem 'aws-s3' I am using amazon S3. the problem came when I ran the migration which had the following migration code class AddImageColumnsToPicture < ActiveRecord::Migration

[Rails] ROR Projects

2012-01-13 Thread Chandresh Patel
Hi, We are agile based offshore software development company. we are working on Ruby on Rails. If you are looking for offshore work then please send an email on inqu...@bacancytechnology.com. Please refer our website www.bacancytechnology.com -Chandresh Founder and CEO Bacancy Technology -- You

[Rails] Re: ActiveRecord: ar-each_model

2012-01-13 Thread tvw
Hi Robert, On 11 Jan., 21:13, Robert Walker wrote: > tvw wrote in post #1040336: > > > today I went into a problem, when I had to iterate over a big result > > set. ActiveRecord produces a huge array of model instances, which > > consumed 1GB of memory on my machine. A comparable perl DBI script