i have been learning rails from
http://guides.rubyonrails.org/getting_started.html and in part creating the
data base i have changed config/databae.yml to
development:
adapter: mysql2
encoding: utf8
database: blog_development
pool: 5
username: myname
password: mypass
host: localhost
socket:/tmp/mysql.sock

to enable me to use MySQL-server..
so when i used rake db:create
then i get this error

rake aborted!
(<unknown>): could not find expected ':' while scanning a simple key at
line 14 column 3

so when i traced i found this errors

** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
rake aborted!
(<unknown>): could not find expected ':' while scanning a simple key at
line 14 column 3
/home/niraj/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in
`parse'
/home/niraj/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in
`parse_stream'
/home/niraj/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in
`parse'
/home/niraj/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in
`load'
/home/niraj/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/application/configuration.rb:115:in
`database_configuration'
/home/niraj/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.6/lib/active_record/railties/databases.rake:6:in
`block (2 levels) in <top (required)>'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in
`call'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in
`block in execute'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in
`each'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in
`execute'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in
`block in invoke_with_call_chain'
/home/niraj/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in
`mon_synchronize'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in
`invoke_with_call_chain'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:176:in
`block in invoke_prerequisites'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in
`each'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in
`invoke_prerequisites'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:157:in
`block in invoke_with_call_chain'
/home/niraj/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in
`mon_synchronize'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in
`invoke_with_call_chain'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in
`invoke'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in
`invoke_task'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in
`block (2 levels) in top_level'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in
`each'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in
`block in top_level'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in
`standard_exception_handling'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in
`top_level'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in
`block in run'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in
`standard_exception_handling'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in
`run'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in
`<top (required)>'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `load'
/home/niraj/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `<main>'


help me .. how to run rake db:create?? and should i keep test and
production same in config/database.yml ??

thank u !!


--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/cf764RR_AfQJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Hassan Schroeder at Jul 20, 2012 at 1:30 pm

    On Fri, Jul 20, 2012 at 12:11 AM, amature wrote:

    so when i used rake db:create
    (<unknown>): could not find expected ':' while scanning a simple key at line
    14 column 3
    So, what is line 14 ?
    ... and should i keep test and production same in config/database.yml ??
    The "same" as what?

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Amature at Jul 20, 2012 at 3:56 pm
    The "same" as what?
    i mean to say test and production code same as in default
    So, what is line 14 ?

    rake db:create

    rake aborted!

    (<unknown>): could not find expected ':' while scanning a simple key at
    line 14 column 3
    Tasks: TOP => db:create => db:load_config


    i dont know which line or column :(..help me plz and thanks for reply !!
    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/YWdaAsTd1n4J.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Hassan Schroeder at Jul 20, 2012 at 4:15 pm

    On Fri, Jul 20, 2012 at 8:55 AM, amature wrote:

    (<unknown>): could not find expected ':' while scanning a simple key at
    line 14 column 3
    i dont know which line or column :(
    Uh, what? Even if you're using a code editor that doesn't show line
    numbers, I would hope you can count.

    But please, start by installing a suitable editor.

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Amature at Jul 21, 2012 at 5:13 am
    thanks for reply...
    i changed
    socket:/tmp/mysql.sock to
    socket: /tmp/mysql.sock and thar error has gone but i face new error
    now..it says

    rake aborted!
    Please install the mysql2 adapter: `gem install
    activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to
    Gemfile.)
    ...learning rails in ubuntu has been lot harder than i thought :(...thx

    On Friday, July 20, 2012 10:00:45 PM UTC+5:45, Hassan Schroeder wrote:
    On Fri, Jul 20, 2012 at 8:55 AM, amature wrote:

    (<unknown>): could not find expected ':' while scanning a simple key
    at
    line 14 column 3
    i dont know which line or column :(
    Uh, what? Even if you're using a code editor that doesn't show line
    numbers, I would hope you can count.

    But please, start by installing a suitable editor.

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan
    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/3VmCvtMeKaQJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Hassan Schroeder at Jul 21, 2012 at 1:17 pm

    On Fri, Jul 20, 2012 at 10:13 PM, amature wrote:

    rake aborted!
    Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter`
    (mysql2 is not part of the bundle. Add it to Gemfile.)
    ...learning rails in ubuntu has been lot harder than i thought :(...thx
    And it will be hard forever, if you don't read and act on the messages
    you're presented with. The above gives you specific actions to take;
    have you done them? If not, why not?

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Colin Law at Jul 21, 2012 at 8:36 pm

    On 21 July 2012 06:13, amature wrote:
    thanks for reply...
    i changed
    socket:/tmp/mysql.sock to
    socket: /tmp/mysql.sock and thar error has gone but i face new error now..it
    says

    rake aborted!
    Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter`
    (mysql2 is not part of the bundle. Add it to Gemfile.)
    ...learning rails in ubuntu has been lot harder than i thought :(...thx
    Try railstutorial.org, which is free to use online. You might find it
    an easier way to get started as it leads you through the basic
    principles one step at a time.

    Colin
    On Friday, July 20, 2012 10:00:45 PM UTC+5:45, Hassan Schroeder wrote:

    On Fri, Jul 20, 2012 at 8:55 AM, amature <nirajhirachan147@gmail.com>
    wrote:
    (<unknown>): could not find expected ':' while scanning a simple key
    at
    line 14 column 3
    i dont know which line or column :(
    Uh, what? Even if you're using a code editor that doesn't show line
    numbers, I would hope you can count.

    But please, start by installing a suitable editor.

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan
    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/rubyonrails-talk/-/3VmCvtMeKaQJ.

    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJul 20, '12 at 8:12a
activeJul 21, '12 at 8:36p
posts7
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase