Hi I recently installed Rails 3.1.1 on my ubuntu after lots of searching on the web I managed to get my first app up and running on the local server but I''m still getting "ActiveRecord::ConnectionNotEstablished" error. I ran my app on Root and I added my root password to the database.yml file and I have everything installed. I don''t know what else to do. help please. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 27 October 2011 06:23, dado_eyad <d.eyad.t-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > I recently installed Rails 3.1.1 on my ubuntu after lots of searching > on the web I managed to get my first app up and running on the local > server but I''m still getting "ActiveRecord::ConnectionNotEstablished" > error. > I ran my app on Root and I added my root password to the database.yml > file and I have everything installed.Can you paste the complete error please with stack trace, also paste database.yml (remove password obviously) Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
here''s the full trace <code> activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:409:in `retrieve_connection'' activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_specification.rb:107:in `retrieve_connection'' activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'' activerecord (3.1.1) lib/active_record/query_cache.rb:65:in `rescue in call'' activerecord (3.1.1) lib/active_record/query_cache.rb:59:in `call'' activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'' actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'' activesupport (3.1.1) lib/active_support/callbacks.rb:392:in `_run_call_callbacks'' activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks'' actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:28:in `call'' actionpack (3.1.1) lib/action_dispatch/middleware/reloader.rb:68:in `call'' rack (1.3.5) lib/rack/sendfile.rb:101:in `call'' actionpack (3.1.1) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'' actionpack (3.1.1) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'' railties (3.1.1) lib/rails/rack/logger.rb:13:in `call'' rack (1.3.5) lib/rack/methodoverride.rb:24:in `call'' rack (1.3.5) lib/rack/runtime.rb:17:in `call'' activesupport (3.1.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call'' rack (1.3.5) lib/rack/lock.rb:15:in `call'' actionpack (3.1.1) lib/action_dispatch/middleware/static.rb:53:in `call'' railties (3.1.1) lib/rails/engine.rb:456:in `call'' railties (3.1.1) lib/rails/rack/content_length.rb:16:in `call'' railties (3.1.1) lib/rails/rack/log_tailer.rb:14:in `call'' rack (1.3.5) lib/rack/handler/webrick.rb:59:in `service'' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'' /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'' </code> and here''s the database.yml <code> development: adapter: mysql2 host: 127.0.0.1 encoding: utf8 reconnect: false database: myapp_development pool: 5 username: root password:***** socket: /var/run/mysqld/mysqld.sock </code> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/XxCouhDMnzwJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 1 November 2011 02:23, dado_eyad <d.eyad.t-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ... > and here''s the database.yml > <code> > development: > adapter: mysql2 > host: 127.0.0.1 > encoding: utf8 > reconnect: false > database: myapp_development > pool: 5 > username: root > password:***** > socket: /var/run/mysqld/mysqld.sock > </code>Was it ok when you created the database (rake db:create) or if you did not create it like that are you able to run migrations ok? (And are you still able to run migrations ok). Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
running "rake db:create" returns rake aborted! couldn''t parse YAML at line 20 column 2 Tasks: TOP => db:create => db:load_config (See full trace by running task with --trace) at line 20 there''s the "socket: /var/run/mysqld/mysqld.sock" -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/rAgWbinripIJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, 2011-11-01 at 05:28 -0700, dado_eyad wrote:> running "rake db:create" returns > rake aborted! > couldn''t parse YAML at line 20 column 2 > > > Tasks: TOP => db:create => db:load_config > (See full trace by running task with --trace) > > > > > at line 20 there''s the "socket: /var/run/mysqld/mysqld.sock"---- yaml is very whitespace sensitive be sure that this line doesn''t use ''tabs'' and only a space socket: /var/run/mysqld/mysqld.sock Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
database.yml was generated by rails and I only added the password. it has no tabs. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/HNKqNhks4vwJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 1 November 2011 13:00, dado_eyad <d.eyad.t-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> database.yml was generated by rails and I only added the password. it has no > tabs.Well there is something wrong with it. Has your password got any funny characters in it? Alternatively retype a few lines around the error and try again, possibly an unprintable char has got in there somehow. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
turned out I only needed to add a space between "password:" and "my password" that''s all. thanks guys. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/YjHomR_kERMJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.