How to install plugins on Rails 3 (and workaround an issue)
fatal: Couldn't find remote ref HEAD
I found the bug report here and used the workaround suggested there:
cd vendor/plugins/
git clone -q http://github.com/rails/exception_notification.git
OR EVEN BETTER
git submodule add http://github.com/rails/exception_notification.git vendor/plugins/exception_notification
09:33 AM, 25 May 2010 by Jade Rubick Permalink | Comments (1)
Interesting methodology for meetings for technical info sharing [www.kaner.com]
12:26 AM, 31 Jan 2010 by Jade Rubick Permalink | Comments (0)
Rails core bug with set_sequence_name [www.ruby-forum.com]
class ForumsForum < ActiveRecord::Base
set_primary_key :forum_id
set_sequence_name 't_acs_object_id_seq'
...
end
However, Rails seems to completely ignore this directive for Postgres. I think it does work for Oracle, but it really does not seem to for Postgres.
Here's a unit test:
def test_save_message
forum = ForumsForum.new(:name => 'Test forum', \
:charter => 'Test charter', \
:presentation_type => 'abc', \
:posting_policy => 'abc', \
:enabled_p => 'f')
forum.save
...
end
Here's the result of the test:
1) Error:
test_save_message(ForumsMessageTest):
ActiveRecord::StatementInvalid: PGError: ERROR: null value in column "forum_id" violates not-null constraint
: INSERT INTO "forums_forums" ("name", "package_id", "last_post", "thread_count", "approved_thread_count", "max_child_sortkey", "charter", "posting_policy", "presentation_type", "enabled_p") VALUES(E'Test forum', NULL, NULL, 0, 0, NULL, E'Test charter', E'abc', E'abc', E'f') RETURNING "forum_id"
test/unit/forums_message_test.rb:20:in `test_save_message'
1 tests, 0 assertions, 0 failures, 1 errors
Note the RETURNING statement. All variations I tried to set_sequence_name did not work. After a little looking, I saw this:
http://www.ruby-forum.com/topic/81873
And looking into the Rails source code, at first glance it does appear that the sequence name is not honored.
I think my next step is going to be to set up edge rails, verify the issue, and write a patch. And I guess I may backport it as well.
If anyone knows a workaround, I'd love to hear it.
10:32 AM, 21 Dec 2009 by Jade Rubick Permalink | Comments (1)
| July 2010 | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |