For newcomers to a new technology and language, building a learning environment is always a difficult topic, especially in the domestic network, the difficulty is greatly increased.
After about more than 10 hours of hard fighting, I finally build a successful ruby+rails+mysql environment in Win7, this article does not have detailed steps, tossing the time did not leisurely blog, at the same time do not want to toss again, write the original intention of this article is just want to and still tossing children's shoes suggestions.
the best policy: do not toss on the Win7:
can use Mac OS, build this environment on Linux is relatively small, encounter problem solving method is very simple. or building a virtual machine is the recommended way.
Chinese policy: ruby+rails+sqlite3
The unwise: Ruby+rails+mysql
Really want to toss, need to install are:
1) Ruby recommends using the Rubyinstaller direct one-click installation method
2) DevKit
3) Gem installation mysql2
4) MySQL connector
Detailed reference http://kingxss.iteye.com/blog/2014443, I refer to countless blogs, found this article is more reliable (at least my situation). There are problems with the reading of the newspaper wrong tips generally no problem.
Finally rails spent about half of my time using MySQL to find out that there was a bug,connector libmysql.lib incompatible: https://bugs.ruby-lang.org/issues/8591
Workaround: Download Gendef.exe build yourself or use only sqlite3 to learn
Official links I can't get through the wall here. Download Link: swm-map-win.zip
Good luck!
Build Ruby on Rails development environment on Win7