I am newbie to ruby on rails, here i am trying to install ruby on rails on 64 bit windows 7.
after running the command rails new app_name
, i did cd app_name
, and then rails server
.but then am getting below error in command prompt.
how can i solve this error?
Could not find gem 'mysql2 (>= 0) x64-mingw32' in any of the gem sources listed
in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
If i run bundle install, i am getting
C:\Users\walnut>bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.................
Using rake 10.4.2
Using i18n 0.7.0
Installing json 1.8.3 with native extensions
Gem::InstallError: The 'json' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
Here you can try this solution :
For use with Ruby 1.8.7 and 1.9.3:
text inside those download page as we install ruby-1.9.3.
ruby dk.rb init
and ruby dk.rb
install to bind it to ruby installations in your path. gem install rails --no-ri --no-rdoc
rails new yourProject
"An error occurred while installing rake (*any version), and Bundler cannot continue."
, refer this solution or follow this step :
C:\\Ruby193\\lib\\ruby\\site_ruby\\1.9.1\\rubygems\\ssl_certs
. rails new yourProject
(previous one failed). yourProject
dir, then run rails server
. I'm also having dificult time when first install on windows platform, hope this help. Please note that, if you are using other than default database using by rails(sqlite3) like mysql, postgresql, etc
, then you need to install the right gem for that to work. just run gem install theRightGemForDatabase
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.