Cannot start server on Lynda Ruby on Rails 4 Essen

2019-08-04 09:58发布

I'm working through the tutorial on Lynda Ruby on Rails 4 Essential Training and all has gone well until i have to type: rails server

I have already seen Ruby on Rails - cannot load such file — mysql2/2.2/mysql2 (LoadError) and this does not solve my problem i still have the very same error.

Then this large error comes up:-

C:\Users\Caroline\Sites\simple_cms>rails server
C:/Ruby22/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x86-
mingw32/lib/mysql2/mysql2.r
b:2:in `require': cannot load such file -- mysql2/2.2/mysql2 (LoadError)
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x86-mingw32/lib/my
sql2/mysql2.rb:2:in `<top (required)>'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x86-mingw32/lib/my
sql2.rb:31:in `require'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x86-mingw32/lib/my
sql2.rb:31:in `<top (required)>'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runti
me.rb:76:in `require'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runti
me.rb:76:in `block (2 levels) in require'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runti
me.rb:72:in `each'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runti
me.rb:72:in `block in require'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runti
me.rb:61:in `each'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runti
me.rb:61:in `require'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler.rb:13
4:in `require'
    from C:/Users/Caroline/Sites/simple_cms/config/application.rb:7:in `<top
(required)>'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/command
s/commands_tasks.rb:78:in `require'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/command
s/commands_tasks.rb:78:in `block in server'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/command
s/commands_tasks.rb:75:in `tap'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/command
s/commands_tasks.rb:75:in `server'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/command
s/commands_tasks.rb:39:in `run_command!'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/command
s.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

Can anyone advise me what has gone wrong here ? I'm working on Windows 7 Professional 32 OS.

Regards,

Caroline

0条回答
登录 后发表回答