# Trunk broken

**URL:** <https://www.ruby-forum.com/t/trunk-broken/100765>\
**Category:** Radiant CMS\
**Created:** [July 31, 2006, 11:27pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765 "2006-07-31T23:27:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [July 31, 2006, 11:27pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765/1 "2006-07-31T23:27:54Z")

</div>

I just checked out the latest version from svn but it seems to be  
broken. After setting up my databases using the scripts I go to  
[http://localhost:3000/admin](http://localhost:3000/admin) and login but then immediately the  
following error occurs. Should I rather be developing against 0.5?

Farrel

RuntimeError in Admin/page#index

Showing app/views/admin/page/index.rhtml where line #6 raised:

script/…/config/…/app/helpers/admin/page\_helper.rb:11:in  
`expanded\_rows’: Called id for nil, which would mistakenly be 4 – if  
you really wanted the id of nil, use object\_id

Extracted source (around line #6):

3: SiteMap.prototype = Object.extend({}, RuledTable.prototype); //  
Inherit from RuledTable  
4: Object.extend(SiteMap.prototype, {  
5:  
6: expandedRows: \<%= expanded\_rows.to\_json %\>,  
7:  
8: onRowSetup: function(row) {  
9: Event.observe(row, ‘click’,  
this.onMouseClickRow.bindAsEventListener(this), false);

RAILS\_ROOT: script/…/config/…  
Application Trace | Framework Trace | Full Trace

vendor/rails/actionpack/lib/action\_view/helpers/capture\_helper.rb:91:in  
`content_for' #{RAILS_ROOT}/app/views/admin/page/index.rhtml:6:in `\_run\_rhtml\_admin\_page\_index’  
(eval):1:in `content_for' #{RAILS_ROOT}/app/views/admin/page/index.rhtml:1:in `eval’  
#{RAILS\_ROOT}/app/views/admin/page/index.rhtml:1:in  
`\_run\_rhtml\_admin\_page\_index’

vendor/rails/actionpack/lib/action\_view/helpers/capture\_helper.rb:91:in  
`content_for' vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb:106:in `capture\_erb\_with\_buffer’  
vendor/rails/actionpack/lib/action\_view/helpers/capture\_helper.rb:68:in  
`capture' vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb:91:in `content\_for’  
vendor/rails/actionpack/lib/action\_view/base.rb:314:in  
`compile_and_render_template' vendor/rails/actionpack/lib/action_view/base.rb:290:in `render\_template’  
vendor/rails/actionpack/lib/action\_view/base.rb:249:in `render_file' vendor/rails/actionpack/lib/action_controller/base.rb:699:in `render\_file’  
vendor/rails/actionpack/lib/action\_controller/base.rb:621:in  
`render_with_no_layout' vendor/rails/actionpack/lib/action_controller/layout.rb:243:in `render\_without\_benchmark’  
vendor/rails/actionpack/lib/action\_controller/benchmarking.rb:53:in  
`render' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure’  
vendor/rails/actionpack/lib/action\_controller/benchmarking.rb:53:in  
`render' vendor/rails/actionpack/lib/action_controller/base.rb:911:in `perform\_action\_without\_filters’  
vendor/rails/actionpack/lib/action\_controller/filters.rb:368:in  
`perform_action_without_benchmark' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform\_action\_without\_rescue’  
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform\_action\_without\_rescue’  
vendor/rails/actionpack/lib/action\_controller/rescue.rb:82:in  
`perform_action' vendor/rails/actionpack/lib/action_controller/base.rb:381:in `process\_without\_filters’  
vendor/rails/actionpack/lib/action\_controller/filters.rb:377:in  
`process_without_session_management_support' vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process’  
vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' vendor/rails/railties/lib/webrick_server.rb:115:in `handle\_dispatch’  
vendor/rails/railties/lib/webrick\_server.rb:81:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service’  
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start\_thread’  
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start’  
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start’  
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start' vendor/rails/railties/lib/webrick_server.rb:67:in `dispatch’  
vendor/rails/railties/lib/commands/servers/webrick.rb:59  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in `require’  
vendor/rails/railties/lib/commands/server.rb:30  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `require’  
script/server:3

vendor/rails/actionpack/lib/action\_view/helpers/capture\_helper.rb:91:in  
`content_for' #{RAILS_ROOT}/app/views/admin/page/index.rhtml:6:in `\_run\_rhtml\_admin\_page\_index’  
vendor/rails/actionpack/lib/action\_view/helpers/capture\_helper.rb:106:in  
`capture_erb_with_buffer' vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb:68:in `capture’  
(eval):1:in `content_for' #{RAILS_ROOT}/app/views/admin/page/index.rhtml:1:in `eval’  
vendor/rails/actionpack/lib/action\_view/helpers/capture\_helper.rb:91:in  
`content_for' #{RAILS_ROOT}/app/views/admin/page/index.rhtml:1:in `\_run\_rhtml\_admin\_page\_index’  
vendor/rails/actionpack/lib/action\_view/base.rb:314:in  
`compile_and_render_template' vendor/rails/actionpack/lib/action_view/base.rb:290:in `render\_template’  
vendor/rails/actionpack/lib/action\_view/base.rb:249:in `render_file' vendor/rails/actionpack/lib/action_controller/base.rb:699:in `render\_file’  
vendor/rails/actionpack/lib/action\_controller/base.rb:621:in  
`render_with_no_layout' vendor/rails/actionpack/lib/action_controller/layout.rb:243:in `render\_without\_benchmark’  
vendor/rails/actionpack/lib/action\_controller/benchmarking.rb:53:in  
`render' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure’  
vendor/rails/actionpack/lib/action\_controller/benchmarking.rb:53:in  
`render' vendor/rails/actionpack/lib/action_controller/base.rb:911:in `perform\_action\_without\_filters’  
vendor/rails/actionpack/lib/action\_controller/filters.rb:368:in  
`perform_action_without_benchmark' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform\_action\_without\_rescue’  
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform\_action\_without\_rescue’  
vendor/rails/actionpack/lib/action\_controller/rescue.rb:82:in  
`perform_action' vendor/rails/actionpack/lib/action_controller/base.rb:381:in `process\_without\_filters’  
vendor/rails/actionpack/lib/action\_controller/filters.rb:377:in  
`process_without_session_management_support' vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process’  
vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' vendor/rails/railties/lib/webrick_server.rb:115:in `handle\_dispatch’  
vendor/rails/railties/lib/webrick\_server.rb:81:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service’  
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start\_thread’  
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start’  
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start’  
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start' vendor/rails/railties/lib/webrick_server.rb:67:in `dispatch’  
vendor/rails/railties/lib/commands/servers/webrick.rb:59  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in `require’  
vendor/rails/railties/lib/commands/server.rb:30  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `require’  
script/server:3

---

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [August 1, 2006, 10:53pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765/2 "2006-08-01T22:53:25Z")

</div>

On 31/07/06, Farrel L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I just checked out the latest version from svn but it seems to be  
> broken. After setting up my databases using the scripts I go to  
> [http://localhost:3000/admin](http://localhost:3000/admin) and login but then immediately the  
> following error occurs. Should I rather be developing against 0.5?
> 
> Farrel

Is the latest version of radiant from svn broken for anyone else? Or  
is it just me?

Farrel

---

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [August 3, 2006, 12:01pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765/3 "2006-08-03T12:01:32Z")

</div>

The trunk is broken for me using the normal setup\_database command on  
mysql. It’s definitely broken.

Josh F.

---

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [August 3, 2006, 12:02pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765/4 "2006-08-03T12:02:14Z")

</div>

Josh F. wrote:

> The trunk is broken for me using the normal setup\_database command on  
> mysql. It’s definitely broken.

Can I see your backtrace?

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [August 2, 2006, 3:36am UTC](https://www.ruby-forum.com/t/trunk-broken/100765/5 "2006-08-02T03:36:29Z")

</div>

On 02/08/2006, at 5:51 AM, Farrel L. wrote:

> On 31/07/06, Farrel L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I just checked out the latest version from svn but it seems to be  
> > broken. After setting up my databases using the scripts I go to  
> > [http://localhost:3000/admin](http://localhost:3000/admin) and login but then immediately the  
> > following error occurs. Should I rather be developing against 0.5?
> 
> Is the latest version of radiant from svn broken for anyone else? Or  
> is it just me?

Revision 87 is working fine for me, on OSX with mongrel and sqlite3.

How did you setup the database?

Bodhi

---

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [August 3, 2006, 12:04pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765/6 "2006-08-03T12:04:49Z")

</div>

On 02/08/2006, at 2:40 PM, Josh F. wrote:

> [http://pastie.caboo.se/6958](http://pastie.caboo.se/6958)
> 
> There you go… should be enough to figure it out…🙂

You don’t have a root-page, so line 11 of page\_helper.rb crashes:

```
 [(@homepage || Page.find_by_parent_id(nil)).id];

```

as Page#find\_by\_parent\_id returns nil. I think you are right though,  
trunk is broken… If you just want to start playing around with  
radiant, just choose option 2 when you run setup\_database, then delete  
the stuff you dont need…

Bodhi

---

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [August 3, 2006, 12:03pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765/7 "2006-08-03T12:03:20Z")

</div>

[http://pastie.caboo.se/6958](http://pastie.caboo.se/6958)

There you go… should be enough to figure it out…🙂

Josh F.

---

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [August 3, 2006, 12:06pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765/8 "2006-08-03T12:06:08Z")

</div>

On 02/08/06, bodhi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> as Page#find\_by\_parent\_id returns nil. I think you are right though,  
> trunk is broken… If you just want to start playing around with  
> radiant, just choose option 2 when you run setup\_database, then delete  
> the stuff you dont need…
> 
> Bodhi

Yeah I set my database up with option 1. So this might be the problem.

Farrel

---

<div class="post-metadata">

**Author:** ![Farrel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Post date:** [August 3, 2006, 12:06pm UTC](https://www.ruby-forum.com/t/trunk-broken/100765/9 "2006-08-03T12:06:39Z")

</div>

Hah, that’s the definition of a bug. 🙂

Josh
