0

I downloaded ruby on rails using railsInstaller and created my first project using "rails new temp" command. Then when I run "bundle install" command, I get the following error:

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 12.3.1
Using concurrent-ruby 1.0.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.3.0
Using crass 1.0.4
Using rack 2.0.5
Using nio4r 2.3.1
Using websocket-extensions 0.1.3
Using mini_mime 1.0.0
Using arel 7.1.4
Installing bindex 0.5.0 with native extensions
Using bundler 1.13.6
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using method_source 0.9.0
Using thor 0.20.0
Using ffi 1.9.25
Using multi_json 1.13.1
Installing puma 3.11.4 with native extensions
Using rb-fsevent 0.10.3
Using tilt 2.0.8
Using sqlite3 1.3.13
Using turbolinks-source 5.1.0
Using i18n 1.0.1
Using tzinfo 1.2.5
Using nokogiri 1.8.2
Using rack-test 0.6.3
Using sprockets 3.7.1
Installing websocket-driver 0.6.5 with native extensions
Using mail 2.7.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

"D:/Program Files/Ruby on Rails/RailsInstaller/Ruby2.2.0/bin/ruby.exe" -r
./siteconf20180615-6548-5cjjdl.rb extconf.rb
creating Makefile

make "DESTDIR=" clean
Makefile:263: *** multiple target patterns.  Stop.

make "DESTDIR="
Makefile:263: *** multiple target patterns.  Stop.

make failed, exit code 2

Gem files will remain installed in D:/Program Files/Ruby on
Rails/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bindex-0.5.0 for
inspection.
Results logged to D:/Program Files/Ruby on
Rails/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/bindex-0.5.0/gem_make.out

An error occurred while installing bindex (0.5.0), and Bundler cannot continue.
Make sure that `gem install bindex -v '0.5.0'` succeeds before bundling.

Could someone help me with this problem. I couldn't find any solution elsewhere.
Edit I'm using Windows 10.

3
  • 1
    try renaming your Ruby on Rails folder to something that does not contain spaces, like RoR for instance. Would love to her response from you. Commented Jun 15, 2018 at 3:51
  • @seethrough Wow never thought of that !! Working like a charm thanks :) Commented Jun 15, 2018 at 11:52
  • oh, I am glad it worked, I was not sure it would I will create answer, would appreciate if you chose it. Commented Jun 15, 2018 at 12:24

3 Answers 3

1

Try renaming your Ruby on Rails folder to something that does not contain spaces, like RoR for instance.

Edit: I was not sure if that would work, but what made me think the above was the case is this part

make "DESTDIR=" clean
Makefile:263: *** multiple target patterns.  Stop.

make "DESTDIR="
Makefile:263: *** multiple target patterns.  Stop.

So the way I understand what is going on is the following: installer meets the destination folder path and when parsing it splits by space(not sure why) and thus ending up with multiple target patterns. Not 100 percent sure, though. Glad my advice helped

Sign up to request clarification or add additional context in comments.

Comments

1

Windows 10 might lack of some binaries that Linux system does (That's what building native extensions means here). Maybe you can remove the gem or either run in a virtual Linux environment for a quick setup.

Comments

0

Better practice is to use ruby installer while installing Ruby On Rails on Windows platform.

use this link to down load the installer ruby installer for windows

One more approach is open new command prompt and install the missing gems or the gem which threw an error. sometimes manually installing gems fixes the error. so open command prompt do the following

1) gem list ---> will print all the gems 2) gem install bindex -v '0.5.0'

continue the procedure until success.

Thanks Ajith

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.