Rails on my main PC was abnormally slow and not suitable for development, so I tried to rebuild the environment on my sub machine, but it didn’t go well, so here’s a memo.
What is Rails?
Ruby on Rails is a framework built with Ruby. It specializes in creating web applications.
Overview
For Rails development, you need:
- Ruby
- Development Kit
- Rails
On Windows, there are methods using “RubyInstaller” and methods that don’t, but I’ll use “RubyInstaller” to quickly get it done.
Download and install RubyInstaller and devkit.
Navigate to the devkit directory and run the following commands:
ruby de.rb init
ruby de.rb install
Error Resolution
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate
- Download file [https://curl.haxx.se/ca/cacert.pem](https://curl.haxx.se/ca/cacert.pem)
- Copy the downloaded file to the ssl_certs folder C:\RailsInstaller\Ruby2.1.0\lib\ruby\2.1.0\rubygems\ssl_certs
http://qiita.com/leon-joel/items/d81675637d1938bbdf91
There’s also a method to create a variable called SSL_CERT_FILE, but I won’t touch on that since the previous method solved it. https://stackoverflow.com/questions/5720484/how-to-solve-certificate-verify-failed-on-windows
Could not find a valid gem ‘rails’ (>= 0)
Resolve by running the command.
gem sources -a http://rubygems.org
https://stackoverflow.com/questions/16944224/ruby-on-rails-could-not-find-a-valid-gem-railso
Somehow got Rails environment set up, but…
I tried it on my sub machine, but it’s still slow. 11310ms for page display is too slow. It’s not this slow on Ubuntu… It seems Windows has various limitations after all.