mysql - ActiveRecord::ConnectionNotEstablished and load_missing_constant:NameError: uninitialized constant Rails::Railtie -
i've spent better part of 2 days on this, , things keep getting broken. started when added couple environment variables .zshrc file, , installations of rails stopped working, after removed env variables. rails getting confused find gems?
ruby: 1.8.7
rails: 2.3.16
database adapter: mysql
update think i've solved it. case of missing gems required (not sure ones exactly) took care of both rail. issue required letter_opener gem, required me use specific_install (0.2.3, not 0.3.3, looks uses different ruby). (what nightmare!)
when load console, warning:
~/.rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.16/lib/active_support/dependencies.rb:466:in 'load_missing_constant':nameerror: uninitialized constant rails::railtie
even though console loads, if try retrieve activerecord object e.g. user.last, activerecord::connectionnotestablished
exception. furthermore:
>> activerecord::base.configurations => {}
the database.yml file fine because pulled straight repo (again, using mysql adapter):
development: host: localhost adapter: mysql username: [name] password: [pw] database: [db]
the directories in path:
pp env["path"].split(":") ["~/.rvm/gems/ruby-1.8.7-head/bin", "~/.rvm/gems/ruby-1.8.7-head@global/bin", "~/.rvm/rubies/ruby-1.8.7-head/bin", "~/.rvm/bin", "/usr/local/bin", "/usr/bin", "/bin", "/usr/sbin", "/sbin"] mysql (2.9.1) author: tomita masahiro rubyforge: http://rubyforge.org/projects/mysql-win homepage: http://github.com/luislavena/mysql-gem installed at: ~/.rvm/gems/ruby-1.8.7-head rvm gemset list gemsets ruby-1.8.7-head (found in ~/.rvm/gems/ruby-1.8.7-head) => (default) global
edit 1: , installed gems:
abstract (1.0.0) actionmailer (2.3.16, 2.3.15) actionpack (4.0.4, 3.0.0, 2.3.16, 2.3.15) activemodel (3.0.0) activerecord (2.3.16, 2.3.15) activeresource (2.3.16, 2.3.15) activesupport (4.0.4, 3.0.0, 2.3.16, 2.3.15) addressable (2.3.6) annotate (2.5.0) awesome_print (1.2.0) builder (3.2.3, 3.2.2, 3.1.4, 2.1.2) bundler (1.15.3) bundler-unload (1.0.2) cfpropertylist (2.2.8) childprocess (0.5.3) chronic (0.10.2) concurrent-ruby (1.0.5) contacts (1.2.4) curb (0.8.6) daemons (1.0.10) delayed_job (2.0.8) diff-lcs (1.2.5) dirty-memoize (0.0.4) distribution (0.7.0) erubis (2.7.0, 2.6.6) eventmachine (1.0.3) execjs (1.4.0) executable-hooks (1.3.2) extendmatrix (0.3.1) ezcrypto (0.7.2) facter (2.1.0 universal-darwin) faraday (0.9.1) fastercsv (1.5.5) ffi (1.9.18, 1.9.3) gbarcode (0.98.16) gdata (1.1.1) gem-wrappers (1.2.7) gpgme (2.0.2) highline (1.6.15) hoptoad_notifier (2.4.11) hpricot (0.8.6) httparty (0.11.0) httpclient (2.8.3, 2.4.0) httpi (2.2.4) i18n (0.8.6, 0.6.11, 0.4.2) json (1.8.1) jwt (1.0.0) launchy (2.4.3) letter_opener (1.0.0) libwebsocket (0.1.8) linecache (0.46) lockfile (2.1.3) macaddr (1.7.1) mail (2.6.1) method_source (0.8.2) mime-types (1.18) mini_magick (3.8.1) mini_portile (0.6.0) minimization (0.2.1) minitest (5.10.3, 4.7.5) multi_json (1.12.1, 1.10.1) multi_xml (0.6.0, 0.5.5) multipart-post (2.0.0) mysql (2.9.1) newrelic_rpm (3.14.2.312) nokogiri (1.5.5) parallel (1.1.2) pony (1.10) powder (0.2.1) priorityqueue (0.1.2) rack (1.5.5, 1.2.8, 1.1.6) rack-mount (0.6.14) rack-test (0.6.3, 0.5.7) rails (2.3.16, 2.3.15) railties (3.0.0) rake (10.1.1) rbx-require-relative (0.0.9) rdoc (4.2.0) redcloth (4.2.9) rest-client (1.6.7) rghost (0.9.4) rghost_barcode (0.9) rmagick (2.13.2) rspec (1.3.0) ruby-saml (0.9) rubygems-bundler (1.4.4) rubygems-update (1.4.2) rvm (1.11.3.9) soap4r (1.5.8) subexec (0.2.3) systemu (2.6.5) text-table (1.2.4) thor (0.19.4, 0.14.6) thread_safe (0.3.6) tunnelss (0.1.1) tzinfo (1.2.3, 0.3.53) uuid (2.3.8) uuidtools (2.1.5) websocket (1.2.4) whenever (0.9.2) xml-simple (1.1.5)
Comments
Post a Comment