-1

When I try to start my Rails server I get the following error:

C:\Users\Mounarajan P A\pro1>rails s
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `requir
e': 193: %1 is not a valid Win32 application.   - C:/Ruby200-x64/lib/ruby/gems/2
.0.0/gems/mysql2-0.3.13/lib/mysql2/mysql2.so (LoadError)
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.13/lib/mysql2.rb
:8:in `<top (required)>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/r
untime.rb:72:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/r
untime.rb:72:in `block (2 levels) in require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/r
untime.rb:70:in `each'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/r
untime.rb:70:in `block in require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/r
untime.rb:59:in `each'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/r
untime.rb:59:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.r
b:132:in `require'
        from C:/Users/Mounarajan P A/pro1/config/application.rb:7:in `<top (requ
ired)>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/co
mmands.rb:76:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/co
mmands.rb:76:in `block in <top (required)>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/co
mmands.rb:73:in `tap'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/co
mmands.rb:73:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Mounarajan
  • 1,357
  • 5
  • 22
  • 43
  • How did you install your Rails development environment? – Victor Sep 22 '13 at 14:42
  • How did you install your MySQL, Rails, Ruby, etc.? – Victor Sep 22 '13 at 14:49
  • @Victor downloaded ruby in website and install rails gem then i downloaded devkit and installed it – Mounarajan Sep 22 '13 at 14:54
  • 1
    Just use http://railsinstaller.org/en which is much easier. – Victor Sep 22 '13 at 14:58
  • @Victor i am asking solution for mysql2 gem? – Mounarajan Sep 22 '13 at 15:00
  • Rails server requires a reasonably specific environment that can be generated by Rails, such as by using "rails new MyApp". This would generate the MyApp application in the subdirectory myapp. You'd then have to change to that directory and run rails server. Obviously, this is an extreme simplification of the process as Rails is a highly-stylized environment. I highly recommend going through www.railstutorial.org for training. – Richard_G Sep 22 '13 at 15:49
  • @R_G yeah i am trying to start my server using this method only "cd my app/rails server" – Mounarajan Sep 22 '13 at 15:52
  • You do understand that will not work, right? – Richard_G Sep 22 '13 at 15:59
  • It isn't important to us how long you've been programming. What interests us is whether you are trying to help yourself. It isn't necessary to tell us your experience, nor beg for help. Just clearly and concisely state the question, give us the data needed to duplicate the problem and show us what the expected output should be. For a question like yours, tell us the steps you've followed, any error messages you received, and pertinent information like your OS, Ruby version, and if we need more we'll ask. – the Tin Man Sep 22 '13 at 18:16
  • @Victor It works with thanks but problem is it works with sqlite3 database not with mysql same problem – Mounarajan Sep 23 '13 at 05:20
  • @Mounarajan Try http://stackoverflow.com/questions/1208029/ and http://stackoverflow.com/questions/10468118 – Victor Sep 23 '13 at 08:58

1 Answers1

1

I saw your other question about getting MySQL2 installed.

My recommendation is that you train using Railstutorial. The link is here.

It will walk you through the process of getting a working environment running and writing Rails code.

Richard_G
  • 4,700
  • 3
  • 42
  • 78