Comments on: Open Flash Chart II – OFC Object Creators http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/ Thu, 15 Jul 2010 02:22:59 +0000 hourly 1 https://wordpress.org/?v=5.6 By: Wheat http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-10822 Thu, 15 Jul 2010 02:22:59 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-10822 Hi,
How can I set tooltip in following situation
In Rails App
I have a controll and write some codes like
def graph_code
chart = OpenFlashChart.new
line = Line.new
….
chart.add_element(line)
chart.set_tooltip(“#x_label#”)

end

How can I set the tip to the value of x_label
I get some like
…….
“tip”: “#x_label#”
….
And it just doesn’t work.
What should I do?

Thanks~

]]>
By: diarmuid http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-905 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-905 Hi

Unsure where else to post any questions about the OFC I figured I would try here. If I am wrong please point me to the correct location.

I am a beginner but I have a basic test_it controller up and running. When I tried to integrate it into some existing code I came up against some issues.

First all errors now see to result in

"undefined method `rewrite’ for "%2Fhome%2Fgraph_code":String"

It took me a while to figure out that the error was some where else but once I figured out that I was able to debug.

It seems in my code I had some non-RESTful link_to statements which were previously working:

<filter:code attributes=lang="ruby">
<%= link_to ‘Add workout’, {:controller => ‘traininglogs’ , :action => :new } %>
< /filter:code>

Once I changed this to :
<filter:code attributes=lang="ruby">
<%= link_to ‘Add workout’, new_traininglog_path %>
< /filter:code>

This error disappeared. Why would the former syntax be an issue?

Unfortunately this did not completely fix my code. I also had a similar syntax but inside a loop

<filter:code attributes=lang="ruby">
<% @traininglogs.sort_by{ |i| i[:dateandtime]}.reverse.each do |traininglog| %>
<tr>
<td><%=h traininglog.duration %></td>
<td><%= link_to ‘Edit’, {:controller => ‘traininglogs’ , :action => :edit , :id => traininglog.id } %></td>
</tr>
<% end %>
< /filter:code>

I cannot for the life of me figure out how to "correct" this syntax.
I tried

<filter:code attributes=lang="ruby">
<td><%= link_to ‘Edit’, edit_traininglog_path %></td>
< /filter:code>
and 101 other combinations but I cannot get remove the error (same as above)

Any ideas or thoughts?

Good work on the code !

]]>
By: charlie http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-906 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-906 @diarmuid – this is fine – I am not sure this is OFC related, but nevertheless –

The basics:
1) What version of rails ?
2) Are you using the latest version of OFC II ?

As for the edit_traininglog_path(), you need to pass in the object that will require editing – edit_traininglog_path(traininglog).

I am not sure how the OFC plugin would be effecting this? Can you post the output of rake routes?

Also, when you use filter:code, make sure to remove the space between < and /filter:code> at the end of your code blocks 😉

Good luck, let me know what you find.

]]>
By: diarmuid http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-907 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-907 Charlie

I am using Rails 2.2.2 on Mac OSX 10.5.6. I installed OFC from git 2 days ago and according to the readme it’s "OpenFlashChart Version 2.0.0 11/14/2008 "

I was passing the traininglog as an argument but that didn’t work either.

The routes is one area that I am not confident in so it’s quite possible the error is there

<filter:code>
$ rake routes
(in /Users/diarmuid/Documents/Rails/coachconnect)
root / {:controller=>"home", :action=>"index"}
logout /logout {:controller=>"sessions", :action=>"destroy"}
login /login {:controller=>"sessions", :action=>"new"}
register /register {:controller=>"users", :action=>"create"}
signup /signup {:controller=>"users", :action=>"new"}
users GET /users {:controller=>"users", :action=>"index"}
formatted_users GET /users.:format {:controller=>"users", :action=>"index"}
POST /users {:controller=>"users", :action=>"create"}
POST /users.:format {:controller=>"users", :action=>"create"}
new_user GET /users/new {:controller=>"users", :action=>"new"}
formatted_new_user GET /users/new.:format {:controller=>"users", :action=>"new"}
edit_user GET /users/:id/edit {:controller=>"users", :action=>"edit"}
formatted_edit_user GET /users/:id/edit.:format {:controller=>"users", :action=>"edit"}
user GET /users/:id {:controller=>"users", :action=>"show"}
formatted_user GET /users/:id.:format {:controller=>"users", :action=>"show"}
PUT /users/:id {:controller=>"users", :action=>"update"}
PUT /users/:id.:format {:controller=>"users", :action=>"update"}
DELETE /users/:id {:controller=>"users", :action=>"destroy"}
DELETE /users/:id.:format {:controller=>"users", :action=>"destroy"}
session POST /session {:controller=>"sessions", :action=>"create"}
formatted_session POST /session.:format {:controller=>"sessions", :action=>"create"}
new_session GET /session/new {:controller=>"sessions", :action=>"new"}
formatted_new_session GET /session/new.:format {:controller=>"sessions", :action=>"new"}
edit_session GET /session/edit {:controller=>"sessions", :action=>"edit"}
formatted_edit_session GET /session/edit.:format {:controller=>"sessions", :action=>"edit"}
GET /session {:controller=>"sessions", :action=>"show"}
GET /session.:format {:controller=>"sessions", :action=>"show"}
PUT /session {:controller=>"sessions", :action=>"update"}
PUT /session.:format {:controller=>"sessions", :action=>"update"}
DELETE /session {:controller=>"sessions", :action=>"destroy"}
DELETE /session.:format {:controller=>"sessions", :action=>"destroy"}
athletes GET /athletes {:controller=>"athletes", :action=>"index"}
formatted_athletes GET /athletes.:format {:controller=>"athletes", :action=>"index"}
POST /athletes {:controller=>"athletes", :action=>"create"}
POST /athletes.:format {:controller=>"athletes", :action=>"create"}
new_athlete GET /athletes/new {:controller=>"athletes", :action=>"new"}
formatted_new_athlete GET /athletes/new.:format {:controller=>"athletes", :action=>"new"}
edit_athlete GET /athletes/:id/edit {:controller=>"athletes", :action=>"edit"}
formatted_edit_athlete GET /athletes/:id/edit.:format {:controller=>"athletes", :action=>"edit"}
athlete GET /athletes/:id {:controller=>"athletes", :action=>"show"}
formatted_athlete GET /athletes/:id.:format {:controller=>"athletes", :action=>"show"}
PUT /athletes/:id {:controller=>"athletes", :action=>"update"}
PUT /athletes/:id.:format {:controller=>"athletes", :action=>"update"}
DELETE /athletes/:id {:controller=>"athletes", :action=>"destroy"}
DELETE /athletes/:id.:format {:controller=>"athletes", :action=>"destroy"}
traininglogs GET /traininglogs {:controller=>"traininglogs", :action=>"index"}
formatted_traininglogs GET /traininglogs.:format {:controller=>"traininglogs", :action=>"index"}
POST /traininglogs {:controller=>"traininglogs", :action=>"create"}
POST /traininglogs.:format {:controller=>"traininglogs", :action=>"create"}
new_traininglog GET /traininglogs/new {:controller=>"traininglogs", :action=>"new"}
formatted_new_traininglog GET /traininglogs/new.:format {:controller=>"traininglogs", :action=>"new"}
edit_traininglog GET /traininglogs/:id/edit {:controller=>"traininglogs", :action=>"edit"}
formatted_edit_traininglog GET /traininglogs/:id/edit.:format {:controller=>"traininglogs", :action=>"edit"}
traininglog GET /traininglogs/:id {:controller=>"traininglogs", :action=>"show"}
formatted_traininglog GET /traininglogs/:id.:format {:controller=>"traininglogs", :action=>"show"}
PUT /traininglogs/:id {:controller=>"traininglogs", :action=>"update"}
PUT /traininglogs/:id.:format {:controller=>"traininglogs", :action=>"update"}
DELETE /traininglogs/:id {:controller=>"traininglogs", :action=>"destroy"}
DELETE /traininglogs/:id.:format {:controller=>"traininglogs", :action=>"destroy"}
coaches GET /coaches {:controller=>"coaches", :action=>"index"}
formatted_coaches GET /coaches.:format {:controller=>"coaches", :action=>"index"}
POST /coaches {:controller=>"coaches", :action=>"create"}
POST /coaches.:format {:controller=>"coaches", :action=>"create"}
new_coach GET /coaches/new {:controller=>"coaches", :action=>"new"}
formatted_new_coach GET /coaches/new.:format {:controller=>"coaches", :action=>"new"}
edit_coach GET /coaches/:id/edit {:controller=>"coaches", :action=>"edit"}
formatted_edit_coach GET /coaches/:id/edit.:format {:controller=>"coaches", :action=>"edit"}
coach GET /coaches/:id {:controller=>"coaches", :action=>"show"}
formatted_coach GET /coaches/:id.:format {:controller=>"coaches", :action=>"show"}
PUT /coaches/:id {:controller=>"coaches", :action=>"update"}
PUT /coaches/:id.:format {:controller=>"coaches", :action=>"update"}
DELETE /coaches/:id {:controller=>"coaches", :action=>"destroy"}
DELETE /coaches/:id.:format {:controller=>"coaches", :action=>"destroy"}
home / {:controller=>"home", :action=>"index"}
/:controller/:action/:id
/:controller/:action/:id.:format

</filter:code>

and just for completeness, here is the error :

<filter:code>
NoMethodError in Home#index

Showing app/views/home/index.html.erb where line #46 raised:

undefined method `rewrite’ for "%2Fhome%2Fgraph_code":String

Extracted source (around line #46):

43: <td><%=h traininglog.activity %></td>
44: <td><%=h traininglog.length %></td>
45: <td><%=h traininglog.duration %></td>
46: <td><%= link_to ‘Edit’, edit_traininglog_path %></td>
47: </tr>
48: <% end %>
49: </table>

RAILS_ROOT: /Users/diarmuid/Documents/Rails/coachconnect
Application Trace | Framework Trace | Full Trace

/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:626:in `url_for’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:85:in `send’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:85:in `url_for’
(eval):16:in `edit_traininglog_path’
app/views/home/index.html.erb:46
app/views/home/index.html.erb:40:in `each’
app/views/home/index.html.erb:40
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `send’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in `render_template’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in `render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in `render_for_file’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:896:in `render_without_benchmark’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:868:in `render_without_benchmark’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1248:in `default_render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1254:in `perform_action_without_filters’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_without_caching’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `send’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process_without_filters’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_without_session_management_support’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load’
/Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require’
/Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:293:in `measure’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in `dispatch’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `synchronize’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `dispatch’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:76:in `process’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in `synchronize’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in `process’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:159:in `process_client’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `each’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `process_client’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `initialize’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `new’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `initialize’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `new’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:282:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in `each’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/command.rb:212:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
script/server:3

/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:626:in `url_for’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:85:in `send’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:85:in `url_for’
(eval):16:in `edit_traininglog_path’
app/views/home/index.html.erb:46
app/views/home/index.html.erb:40:in `each’
app/views/home/index.html.erb:40
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `send’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in `render_template’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in `render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in `render_for_file’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:896:in `render_without_benchmark’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:868:in `render_without_benchmark’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1248:in `default_render’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1254:in `perform_action_without_filters’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:293:in `measure’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_without_caching’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `send’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process_without_filters’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_without_session_management_support’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in `dispatch’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `synchronize’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `dispatch’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:76:in `process’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in `synchronize’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in `process’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:159:in `process_client’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `each’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `process_client’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `initialize’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `new’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `initialize’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `new’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:282:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in `each’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/command.rb:212:in `run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load’
/Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require’
/Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
script/server:3

Request

Parameters:

None

Show session dump


:return_to:
:user_id: 9
:csrf_id: 9260c4aabafa1933eb7be31c1ca026f2
flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{"cookie"=>[],
"Content-Type"=>"text/html",
"Cache-Control"=>"no-cache"}
</filter:code>

]]>
By: Imanel http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-908 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-908 It’s because of newest commit (afb727753d4895730ec24220ca831f73122251cf) – new creators use @url instance variable that’s restricted for rails. Just revert this commit and wait until it’s repaired.

]]>
By: diarmuid http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-909 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-909 Charlie

It seems there is either some problem with the the mac os version of rails or more likely , with my installation.

I setup rails on my linux machine and ran the server there and I get more sensible errors. I will work from there.

thanks and I’ll let you know how I get on

D

]]>
By: diarmuid http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-910 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-910 Spoke too soon. Problem remains on the linux machine

I’ll try Imanel’s recommendations

]]>
By: Imanel http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-911 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-911 Or create evil twin of plugin with modified name of @url in "/vendor/plugins/open_flash_chart/lib/open_flash_chart/open_flash_chart_object.rb" (just tested with @c_url and everything works fine now)

]]>
By: Imanel http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-912 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-912 Sorry for spam – there are no "edit" option and I’m in work so thinking about 3 other things 😉

diff –git a/vendor/plugins/open_flash_chart/lib/open_flash_chart/open_flash_chart_object.rb b/vendor/plugins/open_flash_cha
index 6c94cfd..7efe7c0 100644
— a/vendor/plugins/open_flash_chart/lib/open_flash_chart/open_flash_chart_object.rb
+++ b/vendor/plugins/open_flash_chart/lib/open_flash_chart/open_flash_chart_object.rb
@@ -4,19 +4,19 @@ module OpenFlashChart
module Controller
def open_flash_chart_object(width, height, url, use_swfobject=true, base="/", swf_file_name="open-flash-chart.swf")
get_object_values(url)
– get_html(@url, @div_name, base, swf_file_name, width, height, @protocol, @obj_id)
+ get_html(@c_url, @div_name, base, swf_file_name, width, height, @protocol, @obj_id)
end

# if you want the div name back for working with js, this is the ticket
def open_flash_chart_object_and_div_name(width, height, url, use_swfobject=true, base="/", swf_file_name="open-flash-ch
get_object_values(url)
– html = get_html(@url, @div_name, base, swf_file_name, width, height, @protocol, @obj_id)
+ html = get_html(@c_url, @div_name, base, swf_file_name, width, height, @protocol, @obj_id)
return [html, @div_name]
end

def open_flash_chart_object_from_hash(url, options={})
get_object_values(url)
– get_html(@url,
+ get_html(@c_url,
options[:div_name] || @div_name,
options[:base] || "/",
options[:swf_file_name] || "open-flash-chart.swf",
@@ -27,9 +27,9 @@ module OpenFlashChart
end

def get_object_values(url)
– @url = CGI::escape(url)
+ @c_url = CGI::escape(url)
# need something that will not be repeated on the same request
– @special_hash = Base64.encode64(Digest::SHA1.digest("#{rand(1<<64)}/#{Time.now.to_f}/#{Process.pid}/#{@url}"))[0..7]
+ @special_hash = Base64.encode64(Digest::SHA1.digest("#{rand(1<<64)}/#{Time.now.to_f}/#{Process.pid}/#{@c_url}"))[0..7
# only good characters for our div
@special_hash = @special_hash.gsub(/[^a-zA-Z0-9]/,rand(10).to_s)
@obj_id = "chart_#{@special_hash}" # some sequencing without all the work of tracking it

]]>
By: charlie http://pullmonkey.com/2009/01/12/open-flash-chart-ii-ofc-object-creators/comment-page-1/#comment-913 Mon, 12 Jan 2009 17:50:00 +0000 /2009/01/12/open-flash-chart-ii-ofc-object-creators#comment-913 @Imanel – thanks for the help, I fixed with your suggestion and pushed to the repo.

@diarmuid – Give it a shot with the latest commit.

I changed @url to @ofc_url, hope it helps.

]]>