ruby on rails - precompiling assets failing on remote -
everything working fine locally, when do: bundle exec rake assets:precompile on server, here's get:
/usr/local/rvm/rubies/ruby-2.0.0-p0/bin/ruby /usr/local/rvm/gems/ruby-2.0.0-p0@global/bin/rake assets:precompile:all rails_env=production rails_groups=assets rake aborted! uninitialized constant activerecord::connectionadapters::mysql2adapter /mnt/home/bigdata/config/initializers/special_mysql_types.rb:5:in `<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/engine.rb:588:in `block (2 levels) in <class:engine>' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/engine.rb:587:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/engine.rb:587:in `block in <class:engine>' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing' /mnt/home/bigdata/config/environment.rb:5:in `<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/application.rb:103:in `require' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/application.rb:103:in `require_environment!' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/actionpack-3.2.13/lib/sprockets/assets.rake:93:in `block (2 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:205:in `block in invoke_prerequisites' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:203:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:203:in `invoke_prerequisites' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:183:in `block in invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run' tasks: top => environment (see full trace running task --trace) rake aborted! command failed status (1): [/usr/local/rvm/rubies/ruby-2.0.0-p0/bin/ru...] /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/file_utils.rb:80:in `ruby' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `ruby' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/actionpack-3.2.13/lib/sprockets/assets.rake:12:in `ruby_rake_task' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/actionpack-3.2.13/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task' /usr/local/rvm/gems/ruby-2.0.0-p0/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling' /usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run' /usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval' /usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>' tasks: top => assets:precompile (see full trace running task --trace)
following output of gem list command:
*** local gems *** actionmailer (3.2.13) actionpack (3.2.13) activemodel (3.2.13) activerecord (3.2.13) activeresource (3.2.13) activesupport (3.2.13) arel (3.0.2) builder (3.0.4) bundler (1.3.5) capistrano (2.15.4) capistrano-ext (1.2.1) coffee-rails (3.2.2) coffee-script (2.2.0) coffee-script-source (1.6.2) commonjs (0.2.6) daemon_controller (1.1.4) erubis (2.7.0) execjs (1.4.0) formtastic (2.2.1) formtastic-bootstrap (2.1.1) highline (1.6.18) hike (1.2.2) i18n (0.6.1) journey (1.0.4) jquery-rails (2.2.1) json (1.7.7) less (2.3.2) less-rails (2.3.3) libv8 (3.11.8.17 x86_64-linux) mail (2.5.3) mime-types (1.23) multi_json (1.7.3) mysql2 (0.3.11) net-scp (1.1.0) net-sftp (2.1.1) net-ssh (2.6.7) net-ssh-gateway (1.2.0) passenger (4.0.0.rc6) polyglot (0.3.3) rack (1.5.2, 1.4.5) rack-cache (1.2) rack-ssl (1.3.3) rack-test (0.6.2) rails (3.2.13) railties (3.2.13) rake (10.0.4) rdoc (3.12.2) ref (1.0.4) rubygems-bundler (1.1.1) rvm (1.11.3.7) sass (3.2.8) sass-rails (3.2.6) sprockets (2.2.2) therubyracer (0.11.4) thor (0.18.1) tilt (1.4.1, 1.4.0) treetop (1.4.12) twitter-bootstrap-rails (2.2.6) tzinfo (0.3.37) uglifier (2.1.0, 2.0.1)
local environment mac mountain lion, server generic aws linux. ideas?
here's what's in config/initializers/special_mysql_types.rb (migration files processed locally , db tables created without problem).
activerecord::connectionadapters::mysql2adapter::native_database_types[:big_int_primary_auto_inc] = "bigint(20) unsigned default null primary key auto_increment" activerecord::connectionadapters::mysql2adapter::native_database_types[:big_int_non_primary] = "bigint(20) unsigned default null" activerecord::connectionadapters::mysql2adapter::native_database_types[:int_unsigned] = "int(10) unsigned default null"
this example of how use in migration file:
class createtweets < activerecord::migration def change create_table :tweets, id: false |t| t.column :id, :big_int_primary_auto_inc t.column :tweet_id, :big_int_non_primary t.string :tweet_text, limit: 160 end end end
this database.yml file:
development: adapter: mysql2 encoding: utf8 reconnect: false database: big_data_development pool: 5 username: root password: xxxxxxxx socket: /tmp/mysql.sock test: adapter: mysql2 encoding: utf8 reconnect: false database: big_data_test pool: 5 username: root password: socket: /tmp/mysql.sock production: adapter: mysql2 encoding: utf8 host: xxxxxxxx #this aws rds instance database: bigdata username: bigdata password: xxxxxx
Comments
Post a Comment