I am just getting started with ruby on rails, after installing rails executing many commands on the console, i tried to run rails server with the command rails server but gets an error about not loading coffee-rails, i tried the command gem install coffee-rails i got
gem install coffee-rails
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing coffee-rails:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20140724-4244-v083ym.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.
1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/js
on-1.8.1/gem_make.out
RubyGems 2.4.1 will not build native extensions in Ruby version 1.9.3 and earlier on Windows.
You will need to downgrade RubyGems to 1.8.29.
To do this run the following command:
gem update --system 1.8.29
Check gem version:
gem -v
1.8.29
Now try your command again:
gem install coffee-rails
ref: https://groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion
Take a look at this answer - they seem to have had the same trouble and had to use an older version of make.
Related
This error occurs when I try to install http_parser using gem:
dongl_000#LENNY ~/ava-home (master)
$ gem install http_parser.rb -v '0.6.0'
Building native extensions. This could take a while...
ERROR: Error installing http_parser.rb:
ERROR: Failed to build gem native extension.
c:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160217-15056-1hoiyfc.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating ruby_http_parser-x64-mingw32.def
make: *** No rule to make target '/c/Ruby22-x64/include/ruby-2.2.0/ruby.h', need
ed by 'ruby_http_parser.o'. Stop.
make failed, exit code 2
Gem files will remain installed in c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/http_p
arser.rb-0.6.0 for inspection.
Results logged to c:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0
/http_parser.rb-0.6.0/gem_make.out
How can I resolve this issue?
Versions
ruby : 2.2.1
rubyGem : 2.4.5
I was going through this very same issue.
Looked up the Git Repository for the Gem (HTTP_Parser) and found out the reason for my problem:
HTTP_Parser currently doesn't not support a Path with spaces
So I renamed my path and solved it.
To resolve attempt to add the devkit to Ruby like this:
Install Ruby+DevKit from RubyInstaller: Ruby Window Installers
Downloads
Check the "ridk install" checkbox at the end of the installer.
When RIDK runs, pick option 3 to install both MSYS and MINGW dev tools (make is provided with the MINGW stuff).
Open a fresh console (to get fresh environment variables), and rerun your gem or bundle command...and hope for the best.
My OS is Windows 7 64x Ultimate. I try to install the json gem like this:
gem install json -v '1.8.1'
But I have a problem:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20150220-2012-1uff8mn.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.
1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/js
on-1.8.1/gem_make.out
How can install json 1.8.1?
This seems to be a known bug with Rubygems. Take a look at the issue page for this bug over on github.
It has not yet been fixed but will hopefully be fixed soon. For now, it seems most people have to downgrade to rubygems 2.3.0 to get it to work on Windows. That should solve your problem.
You have to update your ruby gem to the newest version
To check what your ruby in now
$Ruby -v
Update it to ruby version 2.3.7
$rvm list known
$rvm install 2.3.7
$rvm use 2.3.7 --default
$gem install bundler
Check out this video https://www.youtube.com/watch?v=lsNXc3uQ2AA&lc=z22pvls4asawvhi5004t1aokgq0e4p2vb1qpp3w3z252bk0h00410.1528974099408204
Let me know if does that help!
I'm on windows and trying to install rails. but I get the following error message:
Z:\AlexL\My Documents\rails>gem install rails
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20150211-3312-5ie7vd.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.
2 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/js
on-1.8.2/gem_make.out
Ruby version is:
ruby 1.9.3p484
I've got this devkit installed DevKit-tdm-32-4.5.2-20111229-1559-sfx
in this folder:
C:\Ruby193\DevKit\
Not sure what else is wrong?
Looks the same as the issue being discussed here.
Apparently, there is a problem with Ruby 1.9.3 and newer RubyGems versions on Windows machines. Their quick-fix solution was to downgrade to an earlier version of RubyGems.
gem update --system 1.8.29
Once you have done that, confirm that gems -v returns 1.8.29 and try your command again.
Otherwise, you can upgrade to Ruby 2.X, which should also resolve this problem.
I am trying to install json on windows as follows, but its not working. Please help me with possible resoultion for the same.
C:\Ruby193\bin>gem install --local json-1.8.1.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json-1.8.1.gem:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20140725-4216-11o740j.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/json-1.8.1/gem_make.out
RubyGems 2.4.1 will not build native extensions in Ruby version 1.9.3 and earlier on Windows.
You will need to downgrade RubyGems to 1.8.29.
To do this run the following command:
gem update --system 1.8.29
Check gem version:
gem -v
1.8.29
Now try your command again:
gem install --local json-1.8.1.gem
ref: https://groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion
I'm just getting into ruby on rails, And I'm setting it up on a second windows computer.
I've used the most recent 'railsinstaller' using rails: 4.0.0 and ruby: 2.0.0p195
when I run rails new <project name> Rails creates the project but fails on the bundle step with the following error.
Installing atomic (1.1.14)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
D:/RailsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in D:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.1.14 for inspection.
Results logged to D:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.1.14/ext/gem_make.out
An error occurred while installing atomic (1.1.14), and Bundler cannot continue.
Make sure that `gem install atomic -v '1.1.14'` succeeds before bundling.
I've tried a few things I've found on google such as updating gem and ruby but none of that worked... I'm too new to rails to figure this out myself, does anyone know what might be the problem?
EDIT
the outcome of gem install atomic -v '1.1.14'
D:\Programming\Ruby>gem install atomic -v '1.1.14'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ConEmu blocks ANSICON injection
The system cannot find the file D:\ansicon\ansicon-master\ansicon.exe.
ERROR: Error installing atomic:
ERROR: Failed to build gem native extension.
D:/RailsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in D:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.1.14 for inspection.
Results logged to D:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.1.14/ext/gem_make.out
Thanks,
Peter McKinney