[Rails] What is this error?

2012-03-21 Thread Ruby User
I seem to have correct include path, but a lot of gems can't be loaded via "required". What could be the problem? #!/usr/bin/ruby -w require "cgi" # cant load this require "actionpack" # can not load this # /var/www/ruby/test.rb /var/www/ruby/test.rb:3:in `require': no such file to load -- /var/

[Rails] Re: Modifying a gem, best way to deploy

2012-03-21 Thread C
Ignore that last post... I discovered something went wrong with the vendorization of the gem and files did not end up in the correct location. Its working now. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails

[Rails] Re: Modifying a gem, best way to deploy

2012-03-21 Thread C
Michael Pavling wrote in post #1052592: > On 21 March 2012 02:45, wrote: >> For a project I used the gem 'event_calendar'. However, there were a >> couple things I had to manually change within the gem source to suit my >> needs. >> >> How would I go about to deploy this in production 'the rails

Re: [Rails] Getting mysql gem working with ruby-1.9.3 on rvm

2012-03-21 Thread Myth17
Without sudo I get --> ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/mysql-2.8.1/COPYING On Wednesday, March 21, 2012 11:30:54 PM UTC+5:30, Maksim Morozov wrote: > > Why do you use sudo? > > On Wed, Mar 21, 2012 at 8:50 PM, Myth17

[Rails] Re: Ruby - read cookie

2012-03-21 Thread Ruby User
Hi Colin, I am trying to read cookies for the client. The cookie values are being sent to the server, I can see that in http request capture. I am using the above ruby code to read those cookie values. And that is not working. Thanks -- Posted via http://www.ruby-forum.com/. -- You received

Re: [Rails] Postgres COPY from STDIN

2012-03-21 Thread Tim Uckun
> conn = ActiveRecord::Base.connection_pool.checkout > raw  = conn.raw_connection > raw.exec("COPY tablename (col1, col2, col3) FROM STDIN") > # open up your CSV file looping through line by line and getting the line > into a format suitable for pg's COPY... > rc.put_copy_data line > # once all do

[Rails] rails source fields_for has an options hash not defined anywhere

2012-03-21 Thread John Merlino
Hey all, I looked at source code for fields_for: def fields_for(record_name, record_object = nil, fields_options = {}, &block) fields_options, record_object = record_object, nil if record_object.is_a?(Hash) && record_object.extractable_options? fields_options[:builder] ||= options[:builder]

Re: [Rails] Re: Re: @model OR :model in a form_for

2012-03-21 Thread Javier Quarite
On Wed, Mar 21, 2012 at 2:47 PM, Cluter Vipic wrote: > Hi Javier, > > you are right I just added it anyway when I reloaded the page now I have > another error > > undefined method `basket' for # updated_at: nil> > > I'm not sure what are the fields of your Table ... table :D, but according with

[Rails] Re: Re: @model OR :model in a form_for

2012-03-21 Thread Cluter Vipic
Hi Javier, you are right I just added it anyway when I reloaded the page now I have another error undefined method `basket' for # I edit the basket and apple controller with def index @basket = Basket.find(:all) end def index @apple = Apple.find(:all) end but I have always the same erro

Re: [Rails] Re: @model OR :model in a form_for

2012-03-21 Thread Javier Quarite
If you are going to use @table in index.html.erb (that is handled by def index ) you have to add to the index method def index @table = Table.new end but I don't know why does it works with the symbol and not with the instance Javier Q. -- You received this message because you are

[Rails] update a list of model instances and their associations

2012-03-21 Thread John Merlino
I have been unable to figure out how to update a list of model instances and their associations and I have looked in the documentation, which doesnt give an example of what I am trying to do: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-fields_for I would assume

[Rails] Re: @model OR :model in a form_for

2012-03-21 Thread Cluter Vipic
Thanks for all answer I don't use the scaffold for that app here is my table CONTROLLER class TableController < ApplicationController def index @basket = Basket.find(:all) @apple = Apple.find(:all) end def new @table = Table.new end end here my MODEL class Table < ActiveR

Re: [Rails] aws-s3 gem install error- bittorrent.rb

2012-03-21 Thread Maksim Morozov
However you really should think about installing linux or buying a mac. No kidding. On Wed, Mar 21, 2012 at 8:01 PM, Salia Mathis wrote: > Hello, > > Am running build install on an existing project and I get this error: > > Installing aws-s3 (0.6.2) > Errno::EACCES: Permission-denied - > > D:/Rai

Re: [Rails] aws-s3 gem install error- bittorrent.rb

2012-03-21 Thread Maksim Morozov
This project has been deployed on windows in the past? On Wed, Mar 21, 2012 at 8:01 PM, Salia Mathis wrote: > Hello, > > Am running build install on an existing project and I get this error: > > Installing aws-s3 (0.6.2) > Errno::EACCES: Permission-denied - > > D:/RailsInstaller/Ruby1.9.3/lib/ru

Re: [Rails] Getting mysql gem working with ruby-1.9.3 on rvm

2012-03-21 Thread Maksim Morozov
Stop it now! ;) On Wed, Mar 21, 2012 at 10:00 PM, Maksim Morozov wrote: > Why do you use sudo? > > > On Wed, Mar 21, 2012 at 8:50 PM, Myth17 wrote: > >> Hello Everyone >> >> I am trying to setup mysql gem on ruby-1.9.3 installed with rvm. I want >> to set up the 'redmine'. To install mysql gem

Re: [Rails] Getting mysql gem working with ruby-1.9.3 on rvm

2012-03-21 Thread Maksim Morozov
Why do you use sudo? On Wed, Mar 21, 2012 at 8:50 PM, Myth17 wrote: > Hello Everyone > > I am trying to setup mysql gem on ruby-1.9.3 installed with rvm. I want to > set up the 'redmine'. To install mysql gem I used --> > sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql --

[Rails] Getting mysql gem working with ruby-1.9.3 on rvm

2012-03-21 Thread Myth17
Hello Everyone I am trying to setup mysql gem on ruby-1.9.3 installed with rvm. I want to set up the 'redmine'. To install mysql gem I used --> sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/bin/mysql_config When I issue --> RAILS_ENV=pr

Re: [Rails] Postgres COPY from STDIN

2012-03-21 Thread Philip Hallstrom
On Mar 20, 2012, at 8:49 PM, Tim Uckun wrote: > I have done some googling to try and figure out how I can use COPY > FROM STDIN with rails and have ran into some posts on stackoverflow or > the mailing list but none of them seem to be working with rails 3.2 > Does anybody have a working example o

[Rails] aws-s3 gem install error- bittorrent.rb

2012-03-21 Thread Salia Mathis
Hello, Am running build install on an existing project and I get this error: Installing aws-s3 (0.6.2) Errno::EACCES: Permission-denied - D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/aws-s3-0.6.2/lib/aws/s3/bittorrent.rb An error occured while installing aws-s3 (0.6.2) and Bundler cannot

Re: [Rails] notifications (or flash messages) in an api application

2012-03-21 Thread Dave Aronson
On Sun, Mar 11, 2012 at 05:14, Lupu Alexandru Emil wrote: > if false == money_requirement? >  self.add_api_error "You do not have enough money" > end Or should that be "Money enough, you have not. Buy, or buy not, there is no try!"? :-) Having Yodified a lot of my checks in the dim distant pa

[Rails] Re: Modifying a gem, best way to deploy

2012-03-21 Thread Peter
On Mar 20, 9:45 pm, c...@eq4.andreas-s.net wrote: > > How would I go about to deploy this in production 'the rails way'? If you're using bundler (which you should be), then you can: 1) Fork the gem and checkout that fork 2) Make your modifications to your fork (include tests if possible) and push

Re: [Rails] Trying to setup Redmin: Error executing rake generate_session_store

2012-03-21 Thread Myth17
Thanks! I got it running! :) On Wednesday, March 21, 2012 5:26:11 PM UTC+5:30, Morozov Maksim wrote: > > obviously you have no luck with trunk, switch back to 1.8.7 and use last > stable http://www.redmine.org/projects/redmine/wiki/Download > > On Wed, Mar 21, 2012 at 3:35 PM, Myth17 wrote: > >>

[Rails] Rearrangement of Rails folder structure

2012-03-21 Thread Senthil Nambi
Recently watched Robert Martin's Architecture the Lost Years keynote and been thinking about folder structures that 'scream their intent at you.' Here's an attempt at such a structure: https://gist.github.com/2146566 Following Jose Valim's https://gist.github.com/1942658, I created an app with s

Re: [Rails] Trying to setup Redmin: Error executing rake generate_session_store

2012-03-21 Thread Morozov Maksim
obviously you have no luck with trunk, switch back to 1.8.7 and use last stable http://www.redmine.org/projects/redmine/wiki/Download On Wed, Mar 21, 2012 at 3:35 PM, Myth17 wrote: > I am facing issues with mysql when I use redmine from trunk. Which one > should be easier to work on with? > > >

Re: [Rails] Trying to setup Redmin: Error executing rake generate_session_store

2012-03-21 Thread Myth17
I am facing issues with mysql when I use redmine from trunk. Which one should be easier to work on with? On Wednesday, March 21, 2012 4:58:46 PM UTC+5:30, Morozov Maksim wrote: > > What version of redmine do you use? if is not trunk redmine 1.3.x not > supported ruby 1.9.2 > please follow the gu

Re: [Rails] Trying to setup Redmin: Error executing rake generate_session_store

2012-03-21 Thread Morozov Maksim
What version of redmine do you use? if is not trunk redmine 1.3.x not supported ruby 1.9.2 please follow the guide http://www.redmine.org/projects/redmine/wiki/RedmineInstall On Wed, Mar 21, 2012 at 2:29 PM, Myth17 wrote: > I am trying to setup redmine on OSX Lion with ruby1.9.2 with rvm. > > my

[Rails] Re: Database connection to remote machine

2012-03-21 Thread Dharmdip Rathod
Overcome issue by setting Mysql privileges , thanks for all support. -- 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-talk@googlegroups.com. To un

[Rails] Trying to setup Redmin: Error executing rake generate_session_store

2012-03-21 Thread Myth17
I am trying to setup redmine on OSX Lion with ruby1.9.2 with rvm. mythlabs:redmine-1.3.2 myth$ rake generate_session_store NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /Users/myth/Learn/Code/GSOC 2012/redmine-1.

[Rails] Ruby Developer - Contract - London

2012-03-21 Thread Anthony Besant
Hi all, Im currently looking for a Ruby on Rails Developer to work on a contract basis for an Investment bank in London. The role is initially for 6 months but it is expected this will roll on. They are looking for someone to overhaul an existing application and bring it in line with current Rai

Re: [Rails] ActiveModel::MassAssignmentSecurity::Error

2012-03-21 Thread Ahmy Yulrizka
Ahmy Yulrizka I don't hink so, config.active_record.whitelist_attributes = true forces that every model should have attr_accessible. but if I'm not mistaken, config.active_record.mass_assignment_sanitizer = :strict sets that if there is mass assignment, it throws an error. comment it will set the

[Rails] Re: Modifying a gem, best way to deploy

2012-03-21 Thread humbroll
monkey patch +1 vendorize isn't good choice for maintenance. Use AOP with include module chain methology(http://stackoverflow.com/questions/3689736/rails-3-alias-method-chain-still-used) not alias_method_chain. 2012년 3월 21일 수요일 오전 11시 45분 59초 UTC+9, (알 수 없음) 님의 말: > > For a project I used t

Re: [Rails] Ruby - read cookie

2012-03-21 Thread Colin Law
On 17 March 2012 00:49, OK OK wrote: > This code isn't working. whats missing? > > #!/usr/bin/ruby -w > require "cgi" > $appcgi = CGI.new > puts $appcgi.header > $username = $appcgi.cookies['user'] > puts "\r$username" It might help if you tell us what you are trying to do and what actually happe

Re: [Rails] Modifying a gem, best way to deploy

2012-03-21 Thread Michael Pavling
On 21 March 2012 02:45, wrote: > For a project I used the gem 'event_calendar'. However, there were a > couple things I had to manually change within the gem source to suit my > needs. > > How would I go about to deploy this in production 'the rails way'? A few choices: * Vendorize it * Package

Re: [Rails] @model OR :model in a form_for

2012-03-21 Thread Colin Law
On 21 March 2012 00:27, Cluter Vipic wrote: > Hi Folks, > > I want a form in a rails 3.0.10 app with form_for exactly I have 3 > models > > @apple, @basket, @table > > class Apple >    belongs_to :tables >    belongs_to: baskets > end > > class  Basket >    belongs_to :tables >    has_many :apples

[Rails] Re: Modifying a gem, best way to deploy

2012-03-21 Thread Nicolas Sebrecht
The 21/03/12, c...@eq4.andreas-s.net wrote: > For a project I used the gem 'event_calendar'. However, there were a > couple things I had to manually change within the gem source to suit my > needs. > > How would I go about to deploy this in production 'the rails way'? Right > now I have just repl

[Rails] Re: Ruby - read cookie

2012-03-21 Thread OK OK
any one? -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+u