I'm learning about Paperclip: Attaching Files in Rails, following this
link
http://rdoc.info/gems/paperclip/2.3.11/file/README.md
I place these code to display image on show.html.erb
<%= image_tag #user.photo.url %>
<%= image_tag #user.photo.url(:thumb) %>
On new page, I browse a file (.png) from my computer and click create.
Then I got the error
We're sorry, but something went wrong.
When I check on development.log. I found these errors
Status: 500 Internal Server Error
The system cannot find the path specified
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/utils.rb:486:in
`initialize'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/utils.rb:486:in
`new'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/utils.rb:486:in
`parse_multipart'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/utils.rb:471:in
`loop'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/utils.rb:471:in
`parse_multipart'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/request.rb:268:in
`parse_multipart'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/request.rb:146:in
`POST'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:15:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/params_parser.rb:15:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/session/cookie_store.rb:99:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/failsafe.rb:26:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:114:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/reloader.rb:34:in
`run'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:108:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/rack/static.rb:31:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:49:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in
`each'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/rack/log_tailer.rb:17:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/chunked.rb:15:in
`call'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67:in
`process'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:159:in
`process_client'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:158:in
`each'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:158:in
`process_client'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in
`run'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in
`initialize'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in
`new'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in
`run'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:268:in
`initialize'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:268:in
`new'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:268:in
`run'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38:in
`run'
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:111
C:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:31:in
`require'
C:/jruby/jruby-1.5.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
./script/server:3
./script/server:2:in `load'
-e:2
How to solve this problem? Please help!
this could be because of non-existing temp directory ( on linux it is /tmp) or the user running the app does not have read/write permissions for that.
Related
I am getting the following issue while trying to share session between Rails 2 and Rails 4 Applications.
Status: 500 Internal Server Error
uninitialized constant ActiveSupport::HashWithIndifferentAccess
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:469:in `load_missing_constant'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:106:in `rake_original_const_missing'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rake-0.8.3/lib/rake.rb:2465:in `const_missing'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.11/lib/active_support/message_verifier.rb:31:in `load'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.11/lib/active_support/message_verifier.rb:31:in `verify'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/session/cookie_store.rb:171:in `unmarshal'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/session/cookie_store.rb:159:in `unpacked_cookie_data'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/session/abstract_store.rb:257:in `stale_session_check!'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/session/cookie_store.rb:156:in `unpacked_cookie_data'
/home/dinesh/tracoffshore/offshore/lib/rails_4_session_flash_backport/rails2/session_with_indifferent_access.rb:43:in `load_session'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/session/abstract_store.rb:132:in `send'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/session/abstract_store.rb:132:in `load!'
/home/dinesh/tracoffshore/offshore/lib/rails_4_session_flash_backport/rails2/session_with_indifferent_access.rb:14:in `[]'
/home/dinesh/tracoffshore/offshore/vendor/plugins/authlogic-connect/lib/authlogic_connect/callback_filter.rb:14:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-openid-1.3.1/lib/rack/openid.rb:98:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/string_coercion.rb:25:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/head.rb:9:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/methodoverride.rb:24:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/params_parser.rb:15:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/session/cookie_store.rb:99:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/failsafe.rb:26:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/lock.rb:11:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/lock.rb:11:in `synchronize'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/lock.rb:11:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:114:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/reloader.rb:34:in `run'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:108:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rails-2.3.11/lib/rails/rack/static.rb:31:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/urlmap.rb:47:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/urlmap.rb:41:in `each'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/urlmap.rb:41:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rails-2.3.11/lib/rails/rack/log_tailer.rb:17:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/content_length.rb:13:in `call'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/handler/webrick.rb:48:in `service'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/share/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:82:in `start'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rack-1.1.6/lib/rack/handler/webrick.rb:14:in `run'
/home/dinesh/.rvm/gems/ruby-1.8.7-head/gems/rails-2.3.11/lib/commands/server.rb:111
script/server:4:in `require'
script/server:4
I am taking help from the following 3 links.
https://www.theguild.nl/share-sessions-between-rails-2-and-rails-3-applications
https://medium.com/ruby-on-rails/3-steps-to-share-a-session-between-rails-3-and-rails-4-applications-9618766e6c2a#.1q15dg9a4.
http://webuild.envato.com/blog/upgrading-ruby-on-rails-at-production-scale/
Still not able to add ActiveSupport::HashWithIndifferentAccess class to my rails 2 app.
I'd strongly suggest against taking this approach as it's likely to lead to a ton of headaches like the above.
ActiveSupport::HashWithIndifferentAccess is not available in Rails versions prior to 3. You can likely shoehorn HashWithIndifferentAccess into Rails 2, but honestly I think it would be much more worthwhile to upgrade the legacy system.
It's also rather difficult to give much insight without the code that produced the error.
Ocassionally my Rails app that is hosted on Heroku will go down and I am not sure what is happening. Sometimes many request timeout errors may happen beforehand. Then I get this error:
Does anyone have any idea what may be happening or how I might further look into this issue?
NilClass# (PG::Error) "SSL SYSCALL error: EOF detected\n"
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:294:in `exec'/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:294:in `dealloc'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:278:in `block in clear'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:277:in `each_value'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:277:in `clear'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:339:in `clear_cache!'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:352:in `reconnect!'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `verify!'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:333:in `block in checkout_and_verify'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:403:in `_run__2596940609290925681__checkout__3309272650293367200__callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_checkout_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:332:in `checkout_and_verify'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:253:in `block (2 levels) in checkout'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/query_cache.rb:61:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `_run__1965518221808316025__call__3309272650293367200__callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/rack/logger.rb:32:in `call_app'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/rack/logger.rb:16:in `block in call'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/rack/logger.rb:16:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
/app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
/app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
/app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:479:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:223:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/static.rb:119:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/rack/log_tailer.rb:17:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:81:in `block in pre_process'
/app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:in `catch'
/app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:in `pre_process'
/app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:54:in `process'
/app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:39:in `receive_data'
/app/vendor/bundle/ruby/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
/app/vendor/bundle/ruby/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
/app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in <top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
The following link might be a starting point:
https://devcenter.heroku.com/articles/postgres-logs-errors#pgerror-ssl-syscall-error-eof-detected
In particular the following excerpt:
These errors indicate a client side violation of the wire protocol. This happens for one of two reasons:
The Postgres connection is shared between more than one process or thread. Typical offenders are Resque workers or Unicorn. Be sure to correctly establish the PG connection after the fork or thread has initialized to resolve this issue.
Abrupt client (application side) disconnections. This can happen for many reasons, from your app crashing, to transient network availability. When your app tries to issue a query again against postgres, the connection is just gone, leading to a crash. When Heroku detects a crash, we migrate kill that dyno and start a new one, which re-establishes the connection.
I am seeing a similar problem, and while the above is helpful, I'd hope for a way to actually solve the problem (it seems sub-optimal if you can't stop a client from crashing the server). I've submitted a ticket to Heroku, so will advise if I find anything further...
UPDATE: Here is another link that might be relevant: https://github.com/rails/rails/issues/9421.
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.
If I drop in to irb and do require 'atom' I can successfully include the gem but if I try to include it in my controller in rails I get no such file to load -- atom when I visit the page in the browser. What's going on here?
Here's the complete stack trace:
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
D:/Build/Contactly/app/controllers/contacts_controller.rb:3
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:361:in `constantize'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `constantize'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:443:in `recognize'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:436: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/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:114:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:34:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
irb is the interactive Ruby shell which is not rails. when you do gem install you are making it available for your installed version of Ruby, however Rails is slightly different. Rails only interacts with the gems you have listed in your Gemfile. Assuming you are using Rails 3, you would edit your Gemfile to include to the gem
gem 'atom'
save the file and then run
bundle install
then, once you run rails s that gem is available to your rails application. For future note, if you want to try out how something will work in a rails context, instead of invoking irb, invoke rails console or ./script/rails console (depending on which version of rails you are using).
Did you include it in your gemfile?
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