RubyAMF and Rails 2.3.3 - ruby-on-rails

Is anyone else seeing unpredictable results using Flex 3 with Rails 2.3.3 and RubyAMF 1.6.5?
I had to revert back to Rails 2.3.2. Anyone have a clue what's going on?

Nevermind...I found a few issues with name-spacing in my code. Once fixed, RubyAMF 1.6.5 worked fine with Rails 2.3.3.
After further exploration, I see to have run into the issue again. Looks like RubyAMF is choking on a serialization. Any clues on how/what to dig deeper into this issue?
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.include?
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/attribute_methods.rb:142:in `create_time_zone_conversion_attribute?'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/attribute_methods.rb:75:in `define_attribute_methods'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/attribute_methods.rb:71:in `each'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/attribute_methods.rb:71:in `define_attribute_methods'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/attribute_methods.rb:242:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/base.rb:2826:in `hash'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/associations/association_proxy.rb:221:in `send'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/associations/association_proxy.rb:221:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/associations/association_collection.rb:370:in `method_missing'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:366:in `[]='
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:366:in `store_object'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:260:in `write_amf3_array'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:151:in `write_amf3'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:242:in `write_amf3_object'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:236:in `each'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:236:in `write_amf3_object'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:154:in `write_amf3'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:78:in `write'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:70:in `run'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:56:in `upto'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/io/amf_serializer.rb:56:in `run'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/app/filters.rb:91:in `run'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/core_ext/benchmark.rb:10:in `realtime'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/app/filters.rb:91:in `run'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/app/filters.rb:12:in `run'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/app/filters.rb:11:in `each'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/app/filters.rb:11:in `run'
/Users/los/working/test-repo/msnmgmt-backend/vendor/plugins/rubyamf/app/rails_gateway.rb:28:in `service'
/Users/los/working/test-repo/msnmgmt-backend/app/controllers/rubyamf_controller.rb:16:in `gateway'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/base.rb:1327:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/base.rb:1327:in `perform_action_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/filters.rb:617:in `call_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/core_ext/benchmark.rb:10:in `realtime'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/flash.rb:146:in `perform_action'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/base.rb:527:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/base.rb:527:in `process_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/filters.rb:606:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/base.rb:391:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/base.rb:386:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/routing/route_set.rb:434:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:88:in `dispatch'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:111:in `_call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:82:in `initialize'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:29:in `call'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:29:in `call'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:9:in `cache'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:28:in `call'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/params_parser.rb:15:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/session/cookie_store.rb:93:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/reloader.rb:29:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/failsafe.rb:26:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:106:in `call'
/Library/Ruby/Gems/1.8/gems/rails-2.3.3/lib/rails/rack/static.rb:31:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `each'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `call'
/Library/Ruby/Gems/1.8/gems/rails-2.3.3/lib/rails/rack/log_tailer.rb:17:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:61:in `process'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:34:in `run'
/Library/Ruby/Gems/1.8/gems/rails-2.3.3/lib/commands/server.rb:111
/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

Related

Print stack trace in reverse with Ruby 3, Rails 6 and Puma

Is there an easy way to reverse the stack trace when printed by puma? It's quite tedious scroll up the whole stack trace just to see that you have made a typo. Here is an example:
uninitialized constant Treasure
/workspace/app/graphql/types/query_type.rb:7:in `<class:QueryType>'
/workspace/app/graphql/types/query_type.rb:3:in `<module:Types>'
/workspace/app/graphql/types/query_type.rb:1:in `<main>'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/usr/local/bundle/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
/workspace/app/graphql/workspace_schema.rb:3:in `<class:WorkspaceSchema>'
/workspace/app/graphql/workspace_schema.rb:1:in `<main>'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/usr/local/bundle/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
/workspace/app/controllers/graphql_controller.rb:12:in `execute'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/abstract_controller/base.rb:228:in `process_action'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/callbacks.rb:106:in `run_callbacks'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/abstract_controller/callbacks.rb:41:in `process_action'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_controller/metal/rescue.rb:22:in `process_action'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/notifications.rb:203:in `block in instrument'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/notifications.rb:203:in `instrument'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
/usr/local/bundle/gems/activerecord-6.1.3.2/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/abstract_controller/base.rb:165:in `process'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_controller/metal.rb:190:in `dispatch'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_controller/metal.rb:254:in `dispatch'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:33:in `serve'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/journey/router.rb:32:in `each'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/journey/router.rb:32:in `serve'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:842:in `call'
/usr/local/bundle/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
/usr/local/bundle/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
/usr/local/bundle/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
/usr/local/bundle/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/usr/local/bundle/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/usr/local/bundle/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/usr/local/bundle/gems/activerecord-6.1.3.2/lib/active_record/migration.rb:601:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/callbacks.rb:98:in `run_callbacks'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/executor.rb:14:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/usr/local/bundle/gems/railties-6.1.3.2/lib/rails/rack/logger.rb:37:in `call_app'
/usr/local/bundle/gems/railties-6.1.3.2/lib/rails/rack/logger.rb:26:in `block in call'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/tagged_logging.rb:99:in `block in tagged'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/tagged_logging.rb:37:in `tagged'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/tagged_logging.rb:99:in `tagged'
/usr/local/bundle/gems/railties-6.1.3.2/lib/rails/rack/logger.rb:26:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/request_id.rb:26:in `call'
/usr/local/bundle/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/usr/local/bundle/gems/activesupport-6.1.3.2/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/executor.rb:14:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/static.rb:24:in `call'
/usr/local/bundle/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/usr/local/bundle/gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/host_authorization.rb:98:in `call'
/usr/local/bundle/gems/rack-cors-1.1.1/lib/rack/cors.rb:100:in `call'
/usr/local/bundle/gems/railties-6.1.3.2/lib/rails/engine.rb:539:in `call'
/usr/local/bundle/gems/puma-5.3.1/lib/puma/configuration.rb:249:in `call'
/usr/local/bundle/gems/puma-5.3.1/lib/puma/request.rb:76:in `block in handle_request'
/usr/local/bundle/gems/puma-5.3.1/lib/puma/thread_pool.rb:338:in `with_force_shutdown'
/usr/local/bundle/gems/puma-5.3.1/lib/puma/request.rb:75:in `handle_request'
/usr/local/bundle/gems/puma-5.3.1/lib/puma/server.rb:437:in `process_client'
/usr/local/bundle/gems/puma-5.3.1/lib/puma/thread_pool.rb:145:in `block in spawn_thread'
Completed 500 Internal Server Error in 5ms (Views: 1.0ms | ActiveRecord: 0.0ms | Allocations: 2510)
It would be much more convenient if uninitialized constant Treasure were shown at the bottom. I've done some research and it seems like it should have been implemented with Ruby 2.5. Maybe I can configure puma somehow to do this?
I'm using Ruby 3 and Rails 6.
One possibility is to add a middleware to the end of your middleware list, catch the exception there and reverse it.
module MyApp
class FlipExceptions
def initialize(app)
#app = app
end
def call(env)
return #app.call(env)
rescue StandardError => e
trace = e.backtrace.reverse
e.set_backtrace(trace)
raise e
end
end
end

Can I use oracle_enhanced adapter in vanity gem for AB Testing?

For my production database, I am using oracle_enhanced adapter. Is this supported by vanity gem?
From https://github.com/assaf/vanity, it says: "Vanity supports multiple SQL stores (like MySQL, MariaDB, Postgres, Sqlite, etc.) using ActiveRecord, which is built into Rails".
I am not sure if this etc includes Oracle.
I tried using the below in my config/vanity.yml:
production:
adapter: oracle_enhanced
host: mydb.XXX.com
username: XXX
password: XXX
port: XXXX
database: mydb
But what I get is the error message below:
Could not find oracle_enhanced in your load path (RuntimeError)
My config/database.yml is actually using adapter: oracle_enhanced.
Any advice what I'm missing?
[UPDATED]
Below is the stack trace:
Could not find oracle_enhanced in your load path (RuntimeError)
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/adapters.rb:16:in `rescue in establish_connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/adapters.rb:13:in `establish_connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/connection.rb:95:in `establish_connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/connection.rb:68:in `setup_connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/connection.rb:36:in `initialize'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:98:in `new'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:98:in `connect!'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:69:in `connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/frameworks/rails.rb:12:in `block in load!'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:34:in `call'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:42:in `each'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:30:in `instance_exec'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:30:in `run'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:54:in `each'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:54:in `run_initializers'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/application.rb:136:in `initialize!'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/si/si_trunk/config/environment.rb:5:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:105:in `eval'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:105:in `preload_app'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
Then I edited the config/vanity.yml to:
production:
adapter: active_record
active_record_adapter: oracle_enhanced
host: mydb.XXX.com
database: mydb
port: XXXX
username: XXX
password: XXX
This is the stack trace after updating the vanity.yml:
NameError ("DESC vanity_experiments" failed; does it exist?):
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:76:in `describe'
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:219:in `rescue in describe'
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:214:in `describe'
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1074:in `columns_without_cache'
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1063:in `columns'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/model_schema.rb:229:in `yield'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/model_schema.rb:229:in `columns'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/model_schema.rb:249:in `column_names'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/model_schema.rb:262:in `column_methods_hash'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/dynamic_matchers.rb:74:in `all_attributes_exists?'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/dynamic_matchers.rb:27:in `method_missing'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/adapters/active_record_adapter.rb:180:in `set_experiment_created_at'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:159:in `save'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/ab_test.rb:544:in `save'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/definition.rb:21:in `define'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/ab_test.rb:708:in `ab_test'
/experiments/price_options.rb:1:in `new_binding'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:24:in `eval'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:24:in `block in load'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:22:in `instance_eval'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:22:in `load'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/playground.rb:248:in `block in set_experiments'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/playground.rb:247:in `each'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/playground.rb:247:in `set_experiments'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/playground.rb:26:in `initialize'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:137:in `new'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:137:in `load!'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:127:in `playground'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:25:in `custom_template_path_valid?'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:15:in `determine_template_directory'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:4:in `initialize'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:37:in `new'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:37:in `template'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/frameworks/rails.rb:365:in `index'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/base.rb:167:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/rendering.rb:10:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:558:in `block in _run__1055270493__process_action__1054591083__callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_1772'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/frameworks/rails.rb:146:in `vanity_context_filter'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_1772'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:414:in `_run__1055270493__process_action__1054591083__callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/callbacks.rb:17:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/rescue.rb:29:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/notifications.rb:123:in `block in instrument'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/notifications.rb:123:in `instrument'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:30:in `block in process_action'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:362:in `perform_action_with_newrelic_trace'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:25:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/base.rb:121:in `process'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/rendering.rb:45:in `process'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal.rb:203:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal.rb:246:in `block in action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/routing/route_set.rb:73:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/routing/route_set.rb:36:in `call'
vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/routing/route_set.rb:608:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-attack-3.0.0/lib/rack/attack.rb:56:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/etag.rb:23:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/conditionalget.rb:25:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/head.rb:14:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/flash.rb:242:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210:in `context'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/cookies.rb:341:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/query_cache.rb:64:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:405:in `_run__665799391__call__857586578__callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/rack/logger.rb:32:in `call_app'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/rack/logger.rb:16:in `block in call'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/tagged_logging.rb:22:in `tagged'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/rack/logger.rb:16:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/request_id.rb:22:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/lock.rb:15:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:140:in `forward'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:249:in `fetch'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:189:in `lookup'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:66:in `call!'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:51:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/engine.rb:484:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/application.rb:231:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/railtie/configurable.rb:30:in `method_missing'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
/usr/local/httpd/passenger/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/usr/local/httpd/passenger/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
/usr/local/httpd/passenger/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/usr/local/httpd/passenger/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
Is this because the username in the config is not the owner of the table? But, actually, I already granted access (select, insert, update, delete) to the username in the config.
This is my VANITY_EXPERMINETS_TABLE:
COLUMN_NAME DATA_TYPE NULLABLE
EXPERIMENT_ID VARCHAR2(50 BYTE) NO
OUTCOME NUMBER(11,0) YES
ENABLED CHAR(1 BYTE) YES
CREATED_AT DATE YES
COMPLETED_AT DATE YES
Yes - Vanity will work with ActiveRecord database adapters.
As #ksarunas points out, you'll need to add the adapter to your gemfile and make sure that it's required appropriately.
Also, make sure to use the connection setup described in the README, paraphrased for this adapter:
# config/vanity.yml
development:
adapter: active_record
active_record_adapter: oracle_enhanced
# database: ...
# host: ...
test:
adapter: active_record
active_record_adapter: default # Can also use the default AR connection, no need to respecify all of the connection params
collecting: false
production:
adapter: active_record
active_record_adapter: default
Also make sure to run the migrations to create the tables:
$ rails generate vanity
$ rake db:migrate

Crafting Rails Chapter 7: MultiJson::DecodeError - 756: unexpected token at '"Validation failed: %{errors}"':

I'm following through the 'Crafting Rails' book, and I've come to hurdle I just can't get over in the final Chapter (Chap 7)
When I try to run the project at the end of 7.3, I get:
MultiJson::DecodeError - 756: unexpected token at '"Validation failed: %{errors}"':
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/json-1.6.5/lib/json/common.rb:148:in `parse'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/json-1.6.5/lib/json/common.rb:148:in `parse'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/multi_json-1.1.0/lib/multi_json/engines/json_common.rb:9:in `decode'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/multi_json-1.1.0/lib/multi_json.rb:79:in `decode'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/json/decoding.rb:12:in `decode'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:32:in `locale_value'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:55:in `block in evaluate_source'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:54:in `each'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:54:in `evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:127:in `evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/haml.rb:24:in `evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:636:in `render'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:532:in `haml'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:19:in `exhibit_translations'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:10:in `block in <class:App>'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `block in compile!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (3 levels) in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in `route_eval'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (2 levels) in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in `block in process_route'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `catch'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `process_route'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in `block in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `each'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in `dispatch!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `block in call!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `block in invoke'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `catch'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:68:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:594:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/plugin/rack.rb:54:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/flash.rb:242:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/cookies.rb:338:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.2/lib/active_record/query_cache.rb:64:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `_run__2584460681594678013__call__1225515721622234840__callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/reloader.rb:65:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/logger.rb:26:in `call_app'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/logger.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/static.rb:61:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/engine.rb:479:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/application.rb:220:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/log_tailer.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
I've tried stripping all symbols out of that string, but no joy - same issue. Any idea what might be going wrong here? I've literally copied & pasted from the book, so I don't think it's a typo. Could possibly be a redis issue (I'm unfamiliar with it), but it seems to be working fine.
Any ideas appreciated
In gem file declare
gem 'yajl-ruby'
It is used to Parse and encode multiple JSON objects to and from streams or strings continuous.
And require 'yajl/json_gem'
in config/application.rb

mini_magick wrong number of arguments (0 for 1) on .resize

I'm not sure what's going on here.
Using MiniMagick 3.3, everything was working fine until I tried to resize.
This line is causing me to get a wrong number of arguments error:
image_file.resize "#{style.width}x#{style.height}"
Which seems like it should work fine according to the docs.
Here's the trace:
wrong number of arguments (0 for 1)
RAILS_ROOT: /tmn_core_cms
Application Trace | Framework Trace | Full Trace
/tmn_core_cms/vendor/gems/mini_magick-3.3/lib/mini_magick.rb:323:in `combine_options'
/tmn_core_cms/vendor/gems/mini_magick-3.3/lib/mini_magick.rb:323:in `method_missing'
/tmn_core_cms/lib/imagemodule.rb:15:in `apply_styles'
/tmn_core_cms/lib/imagemodule.rb:11:in `apply_styles'
/tmn_core_cms/app/models/asset.rb:143:in `site_image_render'
/tmn_core_cms/app/controllers/articles_controller.rb:66:in `update'
/tmn_core_cms/app/controllers/articles_controller.rb:65:in `update'
image_file = MiniMagick::Image.open("#{RAILS_ROOT}/public/images/i/Standard/#{baseimage.id}/original/#{baseimage.image_file_name}")
The image_file was returning the correct object ( I was testing everything as I added each step, it all worked up until I resized)
The top section says ArgumentError in ArticlesController#update
Here's the full trace:
ArgumentError in ArticlesController#update
wrong number of arguments (0 for 1)
RAILS_ROOT: /tmn_core_cms
Application Trace | Framework Trace | Full Trace
/tmn_core_cms/vendor/gems/mini_magick-3.3/lib/mini_magick.rb:323:in `combine_options'
/tmn_core_cms/vendor/gems/mini_magick-3.3/lib/mini_magick.rb:323:in `method_missing'
/tmn_core_cms/lib/imagemodule.rb:15:in `apply_styles'
/tmn_core_cms/vendor/gems/will_paginate-2.3.15/lib/will_paginate/finder.rb:168:in `method_missing'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:392:in `method_missing_without_paginate'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `each'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `send'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:392:in `method_missing_without_paginate'
/tmn_core_cms/vendor/gems/will_paginate-2.3.15/lib/will_paginate/finder.rb:168:in `method_missing'
/tmn_core_cms/vendor/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/active_record/has_many_association.rb:19:in `method_missing'
/tmn_core_cms/lib/imagemodule.rb:11:in `apply_styles'
/tmn_core_cms/app/models/asset.rb:143:in `site_image_render'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `send'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `evaluate_method'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:93:in `run'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in `each'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in `send'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in `run'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in `run_callbacks'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/callbacks.rb:344:in `callback'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/callbacks.rb:251:in `create_or_update'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/base.rb:2577:in `save_without_validation'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/validations.rb:1090:in `save_without_dirty'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/dirty.rb:79:in `save_without_transactions'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `send'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `with_transaction_returning_status'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in `save'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in `save'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `send'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/autosave_association.rb:356:in `save_has_one_association'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/autosave_association.rb:182:in `autosave_associated_records_for_asset'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `send'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `evaluate_method'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:93:in `run'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in `each'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in `send'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in `run'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in `run_callbacks'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/callbacks.rb:344:in `callback'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/callbacks.rb:251:in `create_or_update'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/base.rb:2577:in `save_without_validation'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/validations.rb:1090:in `save_without_dirty'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/dirty.rb:79:in `save_without_transactions'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `send'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `with_transaction_returning_status'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in `save'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in `save'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/base.rb:2672:in `update_attributes_inside_transaction'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `send'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `with_transaction_returning_status'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/base.rb:2667:in `update_attributes'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `send'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/tmn_core_cms/app/controllers/articles_controller.rb:66:in `update'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:106:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:106:in `respond_to'
/tmn_core_cms/app/controllers/articles_controller.rb:65:in `update'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/base.rb:1333:in `send'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/base.rb:1333:in `perform_action_without_filters'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/local/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/tmn_core_cms/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/flash.rb:151:in `perform_action'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/base.rb:532:in `send'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/base.rb:532:in `process_without_filters'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/base.rb:391:in `process'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/base.rb:386:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:438:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in `dispatch'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in `_call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in `cache'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in `call'
/tmn_core_cms/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/tmn_core_cms/vendor/gems/rack-raw-upload-1.0.9/lib/rack/raw_upload.rb:17:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/head.rb:9:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:99:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/lock.rb:11:in `synchronize'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in `call'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/reloader.rb:34:in `run'
/tmn_core_cms/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:108:in `call'
/tmn_core_cms/vendor/rails/railties/lib/rails/rack/static.rb:31:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
/tmn_core_cms/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/chunked.rb:15:in `call'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67:in `process'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/tmn_core_cms/vendor/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38:in `run'
/tmn_core_cms/vendor/rails/railties/lib/commands/server.rb:111
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
Request
Parameters:
{"article"=>{"asset_attributes"=>{"publish_date(1i)"=>"2011",
"canonical"=>"",
"name"=>"Test",
"content_image_attributes"=>{"image_id"=>"1",
"id"=>"2"},
"publish_date(2i)"=>"9",
"by_line"=>"",
"publish_date(3i)"=>"28",
"guid"=>"",
"display_authorbiography"=>"1",
"content_section_attributes"=>{"id"=>"2",
"primary_section"=>"1"},
"publish_date(4i)"=>"06",
"publish_date(5i)"=>"00",
"id"=>"2",
"public_keywords_string"=>"",
"tagline"=>"",
"keywords_string"=>"",
"display_adsense"=>"1",
"author_id"=>"1",
"series_id"=>"",
"partner_id"=>"",
"short_desc"=>"Test"},
"content_text"=>"<p>\r\n\tTest</p>\r\n"},
"articlems2side__sx"=>"1",
"commit"=>"Update",
"_method"=>"put",
"authenticity_token"=>"R57YKHe3VD38JbpENgZf4ruSAffkyuVp18LY1qOfE/U=",
"id"=>"2-test",
"site"=>{"id"=>""},
"secondary_site"=>{"id"=>""}}
Show session dump
Response
Headers:
{"Content-Type"=>"",
"Cache-Control"=>"no-cache"}
Try replacing the string interpolation with a value and test that, maybe something is going wrong there.
image_file.resize "250x250"
If that works then you need to look at your definition for style since it may not be defined properly or you may be calling a method by an incorrect name.
Edit 0:
Try opening a console for your application and running some example code for MiniMagick just so we can make sure its working:
image = MiniMagick::Image.open("http://www.google.com/images/logos/logo.png")
image.resize "5x5"
If that works in your applications console then the problem exists somewhere besides the installation of the plugin.
Edit 1:
Ok well so its the installation method that's giving you trouble. Using bundler you can install dependencies inside the vendor directory which would give you all the same behaviour of having them installed on the system. Try running bundle install --path vendor/bundle See the docs here.

What is causing ScribdFu::ScribdFuUploadError (Sorry, but ScribdFile #6 could not be uploaded to Scribd)?

I'm getting the following error when trying to upload a file (simple pdf-file of 200kb) in a rails-project I'm configuring right now:
(Sorry, but ScribdFile #6 could not be uploaded to Scribd)
How can I find out what is going wrong? I'm using Windows 7.
I have the same configuration running on another system (Windows 7 as well) without any issues.
This is the full stack (if it helps):
C:/Ruby/lib/ruby/gems/1.8/gems/scribd_fu-2.0.9/lib/scribd_fu.rb:72:in `upload'
C:/Ruby/lib/ruby/gems/1.8/gems/scribd_fu-2.0.9/lib/scribd_fu.rb:189:in `upload_to_scribd'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `send'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `evaluate_method'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:93:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `send'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:344:in
`callback'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:251:in
`create_or_update'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2538:in `save_without_validation'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/validations.rb:1078:in `save_without_dirty'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/dirty.rb:79:in `save_without_transactions'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `send'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `with_transaction_returning_status'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:182:in `transaction'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save'
C:/Ruby/lib/ruby/gems/1.8/gems/rubyist-aasm-2.1.1/lib/aasm/persistence/active_record_persistence.rb:196:in `aasm_write_state'
C:/Ruby/lib/ruby/gems/1.8/gems/rubyist-aasm-2.1.1/lib/aasm/aasm.rb:107:in `set_aasm_current_state_with_persistence'
C:/Ruby/lib/ruby/gems/1.8/gems/rubyist-aasm-2.1.1/lib/aasm/aasm.rb:160:in `aasm_fire_event'
C:/Ruby/lib/ruby/gems/1.8/gems/rubyist-aasm-2.1.1/lib/aasm/aasm.rb:61:in convert!'
c:/xampp/htdocs/lightbulb/app/models/scribd_file.rb:30:inafter_initialize'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:347:in `send'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:347:in `callback'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2441:in `initialize'
c:/xampp/htdocs/lightbulb/app/controllers/attachments_controller.rb:51:in `new'
c:/xampp/htdocs/lightbulb/app/controllers/attachments_controller.rb:51:in `create_attachment'
c:/xampp/htdocs/lightbulb/app/controllers/attachments_controller.rb:49:in `each'
c:/xampp/htdocs/lightbulb/app/controllers/attachments_controller.rb:49:in `create_attachment'
c:/xampp/htdocs/lightbulb/app/controllers/attachments_controller.rb:12:in `create'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `send'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:617:in `call_filters'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
C:/Ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/flash.rb:146:in `perform_action'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `send'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `process_without_filters'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:606:in `process_without_compass'
C:/Ruby/lib/ruby/gems/1.8/gems/chriseppstein-compass-0.8.17/lib/compass/app_integration/rails/action_controller.rb:7:in `process'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:391:in `process'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:386:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:437:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:87:in `dispatch'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:121:in `_call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/haml-3.0.24/lib/sass/plugin/rack.rb:41:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:106:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/cgi_process.rb:44:in `dispatch_cgi'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:27:in `dispatch'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:76:in `process'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:74:in `synchronize'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:74:in `process'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:159:in `process_client'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:158:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:158:in `process_client'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `initialize'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `new'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `initialize'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `new'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:282:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:281:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:281:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:128:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/command.rb:212:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:281
C:/Ruby/bin/mongrel_rails:19:in `load'
C:/Ruby/bin/mongrel_rails:19
What type file are you trying to upload? The usual issue is that the content_type isn't supported.
Problem was the proxy not set.

Resources