[Rails-core] Re: camelize

2008-06-04 Thread Luca Guidi
Hi Lawrence, I experienced the same issue, of course camelize doesn't work properly, but just add the following two lines to the plugin init.rb I can run Rails: require File.dirname(__FILE__) + '/lib/authorization' require File.dirname(__FILE__) + '/lib/authorization/stateful_roles' I didn't i

[Rails-core] Re: Where is the ActiveRecord Oracle Adapter with 2.1?

2008-06-04 Thread Michael Schoen
Please try again, it's working now. On Jun 4, 2008, at 10:20 AM, Nate Wiger wrote: > > I posted this on talk, but got no response. > > I tried this, which worked before: > > sudo gem install activerecord-oracle-adapter --source > http://gems.rubyonrails.org > --no-ri --no-rdoc > > But all I get

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread Steven Soroka
Not if you convert your ip to the compressed signed integer format first. I think your option 3 below is the best choice. On 4-Jun-08, at 3:46 PM, rob-twf wrote: > > Hehe, I'll try and keep this reply a bit shorter :) > > @Steven: won't that prevent you from using the IPs in some kind of > ra

[Rails-core] Re: Migrating to Rack

2008-06-04 Thread Joshua Peek
Its a step backwards in removing all this CGI junk but its going have to do until we don't have to support it. http://github.com/rails/rails/commit/c4d570c2eb6b7bd0a529e20a1055754183d50c23 On Jun 3, 9:56 am, José Valim <[EMAIL PROTECTED]> wrote: > Yep, I thought so! > I was saying for precaution

[Rails-core] camelize

2008-06-04 Thread Lawrence Pit
Hi, I'm getting the following error with a plugin I'm using on rails 2.1 : Plugins::Restful-authentication::Lib" is not a valid constant name! The plugin gets installed in a directory named /vendor/plugins/restful-authentication. I traced this error down to the camelize function. The doc m

[Rails-core] Re: Exception Notification plugin not working with Rails 2.1?

2008-06-04 Thread Michael Koziarski
> Any help would be appreciated! If it's just about making the method protected you should be able to change: @controller.filter_parameters(parameters) to @controller.send(:filter_parameters, parameters) -- Cheers Koz --~--~-~--~~~---~--~~ You received th

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread rob-twf
Hehe, I'll try and keep this reply a bit shorter :) @Steven: won't that prevent you from using the IPs in some kind of range query? e.g. SELECT * FROM some_ips WHERE ip >= start_ip AND ip <= end_ip (maybe not a great example, but you get the idea) My main reason for making primary keys unsigned

[Rails-core] Exception Notification plugin not working with Rails 2.1?

2008-06-04 Thread Trevor Turk
We seemed to stop getting exception notifications in an app that's using Rails 2.1 recently, and I did some digging to try and figure out what the problem was. I think I'm onto the issue, but it would appear that my Ruby-fu is still too weak to find a solution just yet. Here's a failing test with

[Rails-core] Where is the ActiveRecord Oracle Adapter with 2.1?

2008-06-04 Thread Nate Wiger
I posted this on talk, but got no response. I tried this, which worked before: sudo gem install activerecord-oracle-adapter --source http://gems.rubyonrails.org --no-ri --no-rdoc But all I get is: ERROR: could not find activerecord-oracle-adapter locally or in a repository Did the Oracle Ad

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread Frederick Cheung
On 4 Jun 2008, at 17:40, Frederick Cheung wrote: > > On 4 Jun 2008, at 16:58, rob-twf wrote: > >> >> 1. That would be true only for the automatically created primary key >> fields. For all other integer fields the default for unsigned is >> false >> - so nothing changes. > > Does that screw up

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread Frederick Cheung
On 4 Jun 2008, at 16:58, rob-twf wrote: > > 1. That would be true only for the automatically created primary key > fields. For all other integer fields the default for unsigned is false > - so nothing changes. Does that screw up foreign keys ? mysql is rather nit picky about the foreign key a

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread Steven Soroka
FYI, you can currently store IPv4 in the database using a signed field. MIN_INT4_UNSIGNED = -2147483648 I have a method like this that converts an ip string to an integer, then adds the offset above to make it signed. def self.ip_to_int4(an_ip) an_ip.split('.').inject(0){|sum, i| (sum

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread Tarmo Tänav
On K, 2008-06-04 at 08:58 -0700, rob-twf wrote: > So to summarise: > > - signed integers are still the default > - *except* for auto-generated primary keys, and foreign keys created > using the 'sexy' references/belongs_to syntax > - unsigned foreign keys can be created by passing :unsigned => fa

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread Jan De Poorter
Hello, I am personally in favor of the unsigned option. I think it is a better default for primary keys, since those won't ever be -something. Just my 2 cents. Regards, Jan De Poorter http://workswithruby.com On 04 Jun 2008, at 17:58, rob-twf wrote: > > 1. That would be true only for the au

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread rob-twf
1. That would be true only for the automatically created primary key fields. For all other integer fields the default for unsigned is false - so nothing changes. 2. Yes and yes. For example, if you move to a version of Rails with unsigned support, you could write a migration that does things like

[Rails-core] Re: rails 2-1 stable branch broken?

2008-06-04 Thread Chad Pytel
I think we just ran into this this morning. It looks like including 'environment' somewhere (for example, in a rake task or in test_helper) causes the ActiveSupport:Dependency errors. On Jun 4, 2008, at 10:22 AM, Rob Sanheim wrote: > > Hm, could someone whitelist the ticket -- it got marked

[Rails-core] Re: rails 2-1 stable branch broken?

2008-06-04 Thread Rob Sanheim
Hm, could someone whitelist the ticket -- it got marked as spam. - Rob On Wed, Jun 4, 2008 at 9:49 AM, Rob Sanheim <[EMAIL PROTECTED]> wrote: > Can someone take a look and confirm this? > > http://rails.lighthouseapp.com/projects/8994/tickets/331-2-1-stable-branch-broken#ticket-331-1 > > I'm als

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread Tarmo Tänav
On K, 2008-06-04 at 06:25 -0700, rob-twf wrote: > As a practical example: I originally started work on this because I > wanted to store IPv4 addresses in my database, and to do that I really > needed an unsigned 32 bit integer. > > Hope this helps... Yes, I agree that for IPv4 it is indeed usefu

[Rails-core] rails 2-1 stable branch broken?

2008-06-04 Thread Rob Sanheim
Can someone take a look and confirm this? http://rails.lighthouseapp.com/projects/8994/tickets/331-2-1-stable-branch-broken#ticket-331-1 I'm also seeing Dependancy issues with HEAD right now related to the Dependancies move to under ActiveSupport, but I'm assuming things are just in flux right n

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread rob-twf
One of the main advantages would be that it allows you to optimise your database structure, for example, if you want to store a value up to 4294967295 in an integer field you can either do it with a signed bigint (which needs 8 bytes of storage) or in an unsigned integer (which only needs 4 bytes)

[Rails-core] Re: Unsigned integers for MySQL patch

2008-06-04 Thread Tarmo Tänav
On K, 2008-06-04 at 00:52 -0700, rob-twf wrote: > Hi all, > > I posted this patch the other day, now it's time to drum up some > support for it :D > http://rails.lighthouseapp.com/projects/8994/tickets/300-unsigned-integers-for-mysql > > To summarise, it does the following: > > * changes the pr

[Rails-core] Unsigned integers for MySQL patch

2008-06-04 Thread rob-twf
Hi all, I posted this patch the other day, now it's time to drum up some support for it :D http://rails.lighthouseapp.com/projects/8994/tickets/300-unsigned-integers-for-mysql To summarise, it does the following: * changes the primary key data type for the MySQL adapter to be "int(11) unsigned"