install ruby on rails on windows

前端 未结 2 1563
醉酒成梦
醉酒成梦 2020-12-22 03:06

I need to run an application built in ruby on rails. I have installed ruby 1.9.2, rails 3.2.1, gem 1.8.15, Netbeans 6.8, glassfish v3, jdk6u30 and mysql but still, I can\'t

2条回答
  •  臣服心动
    2020-12-22 03:32

    I think its a quite simple to install ROR with mysql database on windows.

    Follow the below instruction

    1. Install Mysql Server 5.6 from [http://dev.mysql.com/downloads/mysql/] , use 32bit for XP and 64Bit for W7.
    2. Go to mysql/bin folder under Program Files and copy and set the path in environment variable.Open command propmt and type mysql in order to check if mysql is installed correctly.
    3. If still problem with Mysql, open run and type services.msc and check for MySQL service is started or not if not start manually.
    4. Download ruby2.0.0, devkit 64-32 from http://rubyinstaller.org/downloads/
    5. Download mysql connector from [http://dev.mysql.com/downloads/connector/c/] and make sure the version should be "(mysql-connector-c-noinstall-6.0.2-win32.zip)", you will find in "Looking for previous GA versions?".
    6. Install ruby in C folder and select add path to executable while installing in first/second prompt.
    7. Create folder devkit and extract devkit into it.
    8. Extract mysql connector in C folder.
    9. Open command Prompt and type ruby -v in order to check if ruby is installed, if not check ruby/bin path have to be added in environment variable.
    10. Go to devkit folder, where you have extracted devkit, open command prompt and type ruby dk.rb init and then ruby dk.rb install.
    11. Now we go through test, follow the instruction is given in test installation section in https://github.com/oneclick/rubyinstaller/wiki/Development-Kit and check with command starts with gem and ruby.
    12. Create directory called dev and go inside it and type command gem install rails.
    13. rails new app -d mysql2
    14. Run command "bundle config build.mysql2 --no-ri --no-rdoc -- --with-mysql-dir=c:\mysql-connector[select what folder name is there for mysql connector]".
    15. bundle install.
    16. If still problem is exist, delete app folder and repeat command rails new app -d mysql2 again.
    17. Go to app folder and use command rails server to start services. Check in browser with localhost:3000.
    18. To create DB, use rake db:create in app folder.

    Hope it helps.

提交回复
热议问题