plerohellec / action_cost Goto Github PK
View Code? Open in Web Editor NEWActionCost measures the performance of a Rails 3 app controller actions in terms of number of calls to the database and to RecordCache.
License: MIT License
ActionCost measures the performance of a Rails 3 app controller actions in terms of number of calls to the database and to RecordCache.
License: MIT License
Following is the error thrown:
.bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method': undefined method `execute' for class `ActiveRecord::ConnectionAdapters::PostgreSQLAdapter' (NameError)
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain'
from /Users/millisami/WebRails/.bundle/gems/action_cost-0.0.1/lib/action_cost/extensions/postgresql_adapter.rb:11:in `<class:PostgreSQLAdapter>'
from /Users/millisami/WebRails/.bundle/gems/action_cost-0.0.1/lib/action_cost/extensions/postgresql_adapter.rb:3:in `<module:ConnectionAdapters>'
from /Users/millisami/WebRails/.bundle/gems/action_cost-0.0.1/lib/action_cost/extensions/postgresql_adapter.rb:2:in `<module:ActiveRecord>'
from /Users/millisami/WebRails/.bundle/gems/action_cost-0.0.1/lib/action_cost/extensions/postgresql_adapter.rb:1:in `<top (required)>'
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/millisami/WebRails/.bundle/gems/action_cost-0.0.1/lib/action_cost/engine.rb:18:in `block in <class:Engine>'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/millisami/WebRails/config/environment.rb:9:in `<top (required)>'
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/millisami/WebRails/.bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/millisami/WebRails/config.ru:3:in `block in <main>'
from /Users/millisami/WebRails/.bundle/gems/rack-1.4.3/lib/rack/builder.rb:51:in `instance_eval'
from /Users/millisami/WebRails/.bundle/gems/rack-1.4.3/lib/rack/builder.rb:51:in `initialize'
from /Users/millisami/WebRails/config.ru:in `new'
from /Users/millisami/WebRails/config.ru:in `<main>'
from /Users/millisami/WebRails/.bundle/gems/rack-1.4.3/lib/rack/builder.rb:40:in `eval'
from /Users/millisami/WebRails/.bundle/gems/rack-1.4.3/lib/rack/builder.rb:40:in `parse_file'
from /Users/millisami/WebRails/.bundle/gems/rack-1.4.3/lib/rack/server.rb:200:in `app'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/commands/server.rb:46:in `app'
from /Users/millisami/WebRails/.bundle/gems/rack-1.4.3/lib/rack/server.rb:304:in `wrapped_app'
from /Users/millisami/WebRails/.bundle/gems/rack-1.4.3/lib/rack/server.rb:254:in `start'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/commands/server.rb:70:in `start'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
from /Users/millisami/WebRails/.bundle/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I added the gem as recommended in one of the issues:
gem 'action_cost', '0.0.1', :git => 'http://github.com/plerohellec/action_cost.git'
I ran bundle install.
Then started my rails app. Sadly, it falls over during initialization:
action_cost loading engine
NoMethodError: undefined method `app' for #<Rails::Paths::Root:0x1130ed80>
Engine at /home/joconnor/.rvm/gems/jruby-1.7.2@xpesa/bundler/gems/action_cost-dc5b06df6c93/lib/action_cost/engine.rb:11
My app uses Rails 3.2.13 and it runs under JRuby 1.7.2.
I tried commenting out the offending line, as Rails::Paths::Root does not seem to have an app method, but I hit an error on my first http request. I suspect the gem command has ignored the versioning, and just taken head. I do hope you can fix this issue quickly, as your idea shows a lot of promise.
I experienced a failure when trying to use action_cost with SQLite.
Specifically:
activesupport-3.2.13/lib/active_support/core_ext/module/aliasing.rb:31:in 'alias_method': undefined method 'execute' for class 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter' (NameError)
Which is being caused by the fact that the gem loads the PostGRES adapter regardless of the db adapter used for the underlying Rails application.
I can't install your gem neither from rubygems.org nor directly from the repo. I guess you need a .gemspec
file, package the gem and optionally push it to rubygems.
I would really like to try this out.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.