[Rails] NilClass in Partial

2012-04-20 Thread Karl McCollester
ributes][]"%> 4: 5: <% fields_for prefix, topic do |topic_form| -%> The partial is rendered in edit.html.erb: Editing tag <%= render 'form' %> <%= render 'topic', :collection => @event.topics %> <%= link_to 'Show', @

[Rails] Ruby crashing: pointer being freed was not allocated

2011-05-18 Thread Karl Smith
I starting seeing this error quite frequently the past couple of days: $ rake routes ruby(38294,0x7fff70ee6ca0) malloc: *** error for object 0x1: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap Rails server crashes, some rake tasks cras

[Rails] Re: Creating Rails Developer Guide

2011-03-07 Thread Karl Falconer
Thanks Fred, I was able to find the guides here: https://github.com/rails/rails/tree/master/railties/guides On Mar 7, 2:24 am, Frederick Cheung wrote: > On Mar 6, 10:43 pm, Karl Falconer wrote: > > > Hello, > > > One of the things, that I really enjoy about the

[Rails] Creating Rails Developer Guide

2011-03-06 Thread Karl Falconer
script to generate their user guide. Thanks, Karl -- 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 rubyon

Re: [Rails] Decimal Columns Allow Defaults?

2011-02-10 Thread Karl Smith
Damn. -- 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+unsubscr...@googlegroups.com. For more options,

[Rails] Decimal Columns Allow Defaults?

2011-02-10 Thread Karl Smith
Is :default allowed as an option for decimal columns? A migration: class CreateMoney < ActiveRecord::Migration def self.up create_table :money do |t| t.decimal :amount, :defaut => 0.0, :precision => 8, :scale => 2 end end def self.down drop_table :money end end Creates

[Rails] Which State Machine?

2011-01-31 Thread Karl Smith
A few years back I used AASM. More recently, I just build state functionally by hand on an as needed basis. So I check out rubygems.org and low-and-behold there are many offerings. Here is a sampling: http://rubygems.org/gems/state_machine http://rubygems.org/gems/aasm http://rubygems.org/ge

[Rails] Re: Unique Serial Number Generation and Locking

2011-01-31 Thread Karl Smith
On Monday, January 31, 2011 2:16:02 PM UTC-7, Ruby-Forum.com User wrote: > > I hope this "credit card" scenario is a contrived example. It seems to > me that it would be critical for the credit card number to be unique > across ALL users. > Yes, it's made up illustrative purposes. > You are

[Rails] Unique Serial Number Generation and Locking

2011-01-31 Thread Karl Smith
I can use either pessimistic locking or optimistic locking. Maybe I'm wrong? Is my only option to lock the table, find the highest credit card number, add 1, update the new credit card number, save, and release the table lock? Karl -- You received this message because you are subscribe

[Rails] long-decimal

2011-01-30 Thread Karl Brodowsky
ve a better representation of DECIMAL() from databases. * adding more functions (sin, cos, tan, cot, sec, csc, asin, acos,..., sinh, cosh,... asinh, acosh,...) Any comments are welcome!! Best regards Karl -- You received this message because you are subscribed to the Google Groups &quo

[Rails] connection_pool with_connection strange behaviour - ActiveRecord 2.3.8

2010-07-29 Thread Karl Baum
t https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1752 , but it seems to have been resolved. I am using ActiveRecord 2.3.8. thx. -karl -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this gr

[Rails] CRM system in rails

2010-05-16 Thread Karl Brodowsky
Hej, does anybody have a good experience with a CRM system written in ROR that could be used instead of vtiger? Best regards Karl -- 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 rub

[Rails] Re: Create Temporary Sqlite in Memory

2010-01-19 Thread Karl Smith
I gave up. Not sure this can even be done in AR, at least not without a fair amount of custom sql. Went with creating a temporary table in production database (postgresql). Not as fast as sqlite/memory, but acceptable. -- You received this message because you are subscribed to the Google Groups "

[Rails] Create Temporary Sqlite in Memory

2010-01-19 Thread Karl Smith
I need to create a temporary, in memory, Sqlite3 database... plus I want all the AR goodness to go with. Oh, and I don't want to affect existing AR models or schemas. I'm close, but I don't know how to create a schema just for my temporary database so that it won't affect other model's schemas. In

[Rails] Re: A Little SQL Help

2010-01-08 Thread Karl Smith
Thanks Rob, that's pretty good. Close to one of my attempts. But what if status is not static? The distinct values of `status` change in value and quantity... which it does. On Jan 8, 3:48 pm, Rob Biedenharn wrote: > > SELECT station, >         SUM(CASE WHEN status = 'Pending' THEN 1 ELSE 0 END

[Rails] A Little SQL Help

2010-01-08 Thread Karl Smith
Can someone give me a hand with the sql (mysql works for me) for this rails project... Data similar to this: Station Status WKRPPending WKRPPending WKRPDeleted WIBCDeleted WFBQPending WFBQNutty What I need is an sql statemen

[Rails] Re: JRuby vs Ruby: why would you ever use ruby?

2009-08-31 Thread Karl Brodowsky
Hej, I have no doubt that JRuby is good stuff and I actually use it myself. My own RubyForge-procect (long-decimal) is done in such a way that it work both in Ruby 1.x and JRuby. Best regards, Karl --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: JRuby vs Ruby: why would you ever use ruby?

2009-08-30 Thread Karl Brodowsky
recommend to carefully consider which one is better. Best regards, Karl --~--~-~--~~~---~--~~ 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 rubyon

[Rails] logging errors with Rails logger

2009-08-18 Thread Karl Baum
my log file is missing valuable meta-data like time and the class which logged the message. Is there something I am missing? thx. -karl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" g

[Rails] backporting C version of Array.combination to ruby 1.86

2009-07-21 Thread Karl
ruby inline but so far no luck. Of course my experience to C was limited to my college days way back when so it's no surprise. thx. -karl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&quo

[Rails] json - composite objects

2009-06-06 Thread karl
; . as far as i know this should be the right json syntax. when i'm reading the params im my controller i'm getting this "{"bla"=>"", "id"=>"3", "picture"=>"[object Object]", "_"=>"1244292346625"

[Rails] Re: Deploying Rails App on Debian Etch / Apache2 / Passenger

2009-05-19 Thread karl
What is PassengerRuby set to in > your Apache configuration? Which version of Ruby is being invoked from > the shell (run "which ruby")? > > On May 19, 10:00 am, karl wrote: > > > Changed all the permissions, set path etc. but no changes yet... > > > On 18 Mai

[Rails] Re: Deploying Rails App on Debian Etch / Apache2 / Passenger

2009-05-19 Thread karl
bservations: >  1)  I had to include the full path for passenger-install-apache2-module, > didn't work as # passenger-install-apache2-module , not found) >  2)  script/console, script/runner, script/server - all worked fine, but > passenger/apache2 didn't work until I got permi

[Rails] logging with the daemons gem

2009-05-19 Thread Karl Baum
I am trying to leverage the daemons gem but I am confused about the proper way to set up logging. I am able pass options which configure stdout to go to a log file but it seems like all calls to Rails.logger are disabled as I see the following message in my output: usr/local/lib/ruby/gems/

[Rails] Re: Deploying Rails App on Debian Etch / Apache2 / Passenger

2009-05-18 Thread karl
Never mind, script/console works fine. passenger not... On 18 Mai, 20:08, karl wrote: > Ok, > > tried these things. The gems are the same. > Changing permissions doesn't do anything. Running irb as www-data > works fine. Should be a rails problem since it doesn't w

[Rails] Re: Deploying Rails App on Debian Etch / Apache2 / Passenger

2009-05-18 Thread karl
Ok, tried these things. The gems are the same. Changing permissions doesn't do anything. Running irb as www-data works fine. Should be a rails problem since it doesn't work with script/console... On 18 Mai, 19:33, César wrote: > Karl, >       are you sure that all the gems i

[Rails] Deploying Rails App on Debian Etch / Apache2 / Passenger

2009-05-18 Thread karl
the same configuration on my mac. Please help, Karl --~--~-~--~~~---~--~~ 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 unsub

[Rails] Creating raw text from a TMail object

2009-04-13 Thread Karl
I see many examples of converting a raw text email into a TMail object using the parse method, but how can I take an existing TMail object and convert it to raw text? In my case, I would like to dump the full text representation of the email to the database. thx. -karl

[Rails] Re: Method to remove html escape characters from strings

2009-04-08 Thread Karl Baum
That worked. Thanks! On Wed, Apr 8, 2009 at 3:04 PM, Philip Hallstrom wrote: > > > Is there a convenient way of removing html escape characters from > > Strings? I could do using reg exp as in: > > > > => "hello & goodbye" > >>> "hello & goodbye".gsub(/&/, "&") > > => "hello & goodbye" > > > >

[Rails] Method to remove html escape characters from strings

2009-04-08 Thread Karl
Is there a convenient way of removing html escape characters from Strings? I could do using reg exp as in: => "hello & goodbye" >> "hello & goodbye".gsub(/&/, "&") => "hello & goodbye" but I figured there might be a better way. thx. --~--~-~--~~~---~--~~ You rece

[Rails] Re: script/server error on Mac OS X

2009-03-28 Thread Karl Hoover
Same problem here, fastthread 1.0.4 are 1.0.5 are broken or otherwise incompatible with the latest update - SOLUTION: uninstall fastthread 1.0.4 and explicitly install fastthread 1.0.1 here is partial log of my session Hoover-iMac:/var/www/cook amateur_peasant$ mongrel_rails start -d dyld: NSL

[Rails] Re: Understanding how methods are made available within controller tests

2009-03-13 Thread Karl Baum
ed module. Is rails including extra modules within my classes at runtime? Thanks for your help! -karl On Fri, Mar 13, 2009 at 5:53 AM, Frederick Cheung < frederick.che...@gmail.com> wrote: > > > > On Mar 13, 3:38 am, Karl wrote: > > Being new to rails and ruby, I am tryi

[Rails] Understanding how methods are made available within controller tests

2009-03-13 Thread Karl
sert_redirected_to :action => protected_page assert_nil session[:protected_page] end def cookie_value(symbol) cookies[symbol.to_s].value.first end def cookie_expires(symbol) cookies[symbol.to_s].expires end thx. -karl --~--~-~--~~~---~--~~ You

[Rails] Template-engine without rails

2009-02-11 Thread Karl Brodowsky
I would be interested in running a template engine to create output in any xml-format from Ruby/JRuby. I think using the <%..%> notation of rails would do, but I don't want this to go to the web, but rather keep it in the file system as output. Best re

[Rails] Automatically updating the localization dictionaries

2008-11-24 Thread Karl Eklund
With gettext-rails, I could do "rake updatepo" to automatically scan my views and controllers for localizable messages and update my .po files. As gettext-rails stopped working with Rails 2.2, I decided to switch to the built-in I18n system, but I'm missing that functionality. Is there some simila