Reputation:
I have installed ruby on rails on windows and have ruby installed as well. I know rubygems is working correctly because I installed jekyll with it and jekyll works fine. When I run the following code:
rails new myapp
I get the following output:
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/javascripts/application.js
create app/assets/stylesheets/application.css
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/views/layouts/application.html.erb
create app/assets/images/.keep
create app/mailers/.keep
create app/models/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/bundle
create bin/rails
create bin/rake
create bin/setup
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/secrets.yml
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/assets.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/cookies_serializer.rb
create config/initializers/filter_parameter_logging.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/session_store.rb
create config/initializers/wrap_parameters.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create lib
create lib/tasks
create lib/tasks/.keep
create lib/assets
create lib/assets/.keep
create log
create log/.keep
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/robots.txt
create test/fixtures
create test/fixtures/.keep
create test/controllers
create test/controllers/.keep
create test/mailers
create test/mailers/.keep
create test/models
create test/models/.keep
create test/helpers
create test/helpers/.keep
create test/integration
create test/integration/.keep
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/javascripts
create vendor/assets/javascripts/.keep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.keep
run 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::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20151026-12392-101agu7.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.
make failed, exit code 1
Can anyone please help me solve this problem?
Upvotes: 0
Views: 778
Reputation: 89
I encountered this issue in Windows 10. I even used cygwin and git bash but had similar errors ('make is not recognized... blah blah'). Basically my errors were that I did not extract all of the files in the folder. As soon as I fixed that, the problem was solved.
I'm running an Acer Aspire. First, I downloaded the correct version for my desktop (x64) from http://rubyinstaller.org/downloads/. Then I ran the installer and extracted them in a folder in my C: drive without any spaces on the folder name.
The ff. files and folders should be extracted to that folder: /bin, /etc, /include, /lib, /mingw, mysys.bat, dk.rb, etc. I checked that they're all there.
Then I ran the instructions according to https://github.com/oneclick/rubyinstaller/wiki/Development-Kit with 'init' and 'install' After that, I ran the rails command again with the new project and it went through successfully.
Upvotes: 0
Reputation: 6057
You need to install the DevKit build tools because JSON is a native extension. If you used RailsInstaller it should be there. If you used Ruby installer, get it from here. Just make sure to get the DevKit version that matches your Ruby version. You will have to add the DevKit to your PATH
a script in the installation directory can do that, or you can do it yourself. More help can be found at: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
Also, I suggest the 32 bit edition of Ruby because the 64-bit version has issues with some Gems. It also might be safer to go with Ruby 2.1 or 2.0 at the moment for Gem issues as well.
Upvotes: 1
Reputation: 1
For windows users: use rubyinstaller
Development Kit Detailed guid https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
Upvotes: 0