(I am using Windows 8)
I finally got the rmagick gem to install by opening the msys.bat file in my Devkit folder using this command
gem install rmagick --platform=ruby -- --with-opt-lib=c:/imagemagick/lib --with-opt-include=c:/imagemagick/include
This is the output
Building native extensions with: '--with-opt-lib=c:/imagemagick/lib --with-opt-i
nclude=c:/imagemagick/include'
This could take a while...
Successfully installed rmagick-2.15.0
Parsing documentation for rmagick-2.15.0
Done installing documentation for rmagick after 6 seconds
1 gem installed
But when I run the same exact command using gitbash I get this error:
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-opt-lib=c:/imagemagick/lib --with-opt-include=c:/imagemagick/include'
This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
c:/RailsInstaller/Ruby2.1.0/bin/ruby.exe extconf.rb --with-opt-lib=c:/imagemagick/lib --with-opt-include=c:/imagemagick/include
Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include=${opt-dir}/include
--with-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=c:/RailsInstaller/Ruby2.1.0/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rmagick-2.15.0 for inspection.
Results logged to c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/rmagick-2.15.0/gem_make.out
I get this same exact error when running bundle install using gitbash and when I try to run bundle install using msys.bat I get the same error but its a bit longer and complains about development tools.
If it works using msys.bat, what do I need to change to get it to work with gitbash and with bundle installs?
EDIT: I did the same command using msys.bat but specified rmagick -v '2.13.3' and bundle install worked. My gemfile doesn't specify a version so not sure why 2.15.0 didn't work. Anyways things are working...so far. But I do think I should think about switching from windows like the first comment suggests due to all the problems I've faced so far with windows.
Related
I'm installing ruby on rails and redmine with xampp following this documentation:
http://nlb-creations.com/2013/06/26/installing-ruby-on-rails-and-redmine-with-xampp-on-windows-7/
Step 12 requires installing rmagick, I followed the steps correctly till I reached 12-d :
In the cmd window, run the following:
gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include
I got the following error:
C:\xampp\htdocs\dev-ruby\redmine>gem install rmagick --platform=ruby -- --with-o
pt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb --with-opt-lib=c:/Im
ageMagick/lib --with-opt-include=c:/ImageMagick/include
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include=${opt-dir}/include
--with-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby1.9.3/bin/ruby
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/rmagick-2.13.3 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rmagick-2
.13.3/ext/RMagick/gem_make.out
I downloaded ImageMagick-devel-6.8.9.9.aarch64.rpm cz it might solve my problem but I don't know how to install it. Any ideas please?
Sounds like you're trying to install the RMagick gem before installing ImageMagick:
The RPM is for certain Linux distributions.
Try installing http://www.imagemagick.org/script/binary-releases.php#windows then the gem.
i need to install Rmagick for my app so
i have searched allmost all related my question on web and stakeoverflow too but non of these worked for me.
i have followed this too but not worked
http://stackoverflow.com/questions/6473853/ruby-on-rails-rmagick-on-windows-7
My Ruby version -> 1.9.3
Rails version -> 3.2.9
ImageMagick version ->ImageMagick-6.8.3-2-Q16-x86-dll.exe
i have installed ImageMagick here -> C:\ImageMagick-6.8.3-Q16
i opend CMD then typed
gem install rmagick --platform=ruby -- --with-opt-lib=C:\ImageMagick-6.8.3-Q16\lib --with-opt-include=C:\ImageMagick-6.8.3-Q16\include
Error is
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
d:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb --with-opt-lib=C:ImageMagick-6.8.3-Q16lib --with-opt-include=C:ImageMagick-6.8
.3-Q16include
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include=${opt-dir}/include
--with-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=d:/RailsInstaller/Ruby1.9.3/bin/ruby
Gem files will remain installed in d:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2 for inspection.
Results logged to d:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
Copying the answer from the comments in order to remove this question from the "Unanswered" filter:
I found solution and its worked http://rorashish.blogspot.in/2012/08/installing-rmagick-with-imagemagic-on.html
~ answer per Gagan
See the link above for the full details, but the high-level steps (as of 2012 August 9) are:
Install Ghostscript
Install Imagemagick (use the 32-bit version, as the 64-bit is not working)
Restart the console/cmd prompt/IDE/... (or windows)
Install rmagick
In the past I used RMagick and also had Imagemagick, and recently I bundle installed a newer version of RMagick.
When restarting my rails server I got errors. So I decided to uninstall first imagemagick (from brew) and then uninstall rmagick.
I tried re-installing rmagick and I am some trouble (first one being I can't install from the bundle command). I tried gem install rmagick -v '2.13.1' but I get the following permission error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/username/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper
I also tried with the sudo and got
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/username/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper
usercomputer:~ Username$ sudo gem install rmagick -v '2.13.1'
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/username/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for /usr/bin/gcc-4.2... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /Users/username/.rvm/gems/ruby-1.9.3-p194/bin:/Users/Aurelien/.rvm/gems/ruby-1.9.3-p194#global/bin:/Users/username/.rvm/rubies/ruby-1.9.3-p194/bin:/Applications/MAMP/bin/php5/bin:/Applications/MAMP/htdocs/cake/cake/cake/console:/Users/username/.rvm/gems/ruby-1.9.3-p194/bin:/Users/username/.rvm/gems/ruby-1.9.3-p194#global/bin:/Users/username/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/username/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/username/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
Gem files will remain installed in /Users/username/.rvm/gems/ruby-1.9.3-p194/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/username/.rvm/gems/ruby-1.9.3-p194/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
Surely I have done something wrong along the way, but I am not sure what?
Thank you for you answers.
It seems the latest version of ImageMagick is not compatible with RMagick. I solved the issue by following this:
http://blog.paulopoiati.com/2013/01/28/installing-rmagick-in-mac-os-x-mountain-lion-with-homebrew/
The following error comes up:
C:\gem>gem install sqlite3-ruby --local
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for #include <sqlite3.h>
... no
sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1
.3.0 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.0/ext/sqlite3/
gem_make.out
I have copied all the necessary files required in the Ruby/Bin folder, still it keeps reporting this error that sqlite3.h is missing.
Please do tell where do I have to place sqlite3.h, when I am installing the gem locally as you can see and I am currently using 1.3.0 version of SQLite3 for its installation.
I have tried with the solutions that were posted for similar problems. And I am using Windows XP.
Thanks in advance.
I had this problem. This is the solution I found. It's not very pretty, but it worked for me. In my case, I was using cygwin. There's probably a similar way to do it without using cygwin, but I don't know how.
1) Download the source of SQLite. I went for SQLite 3.6.23, somewhat arbitrarily, via this URL:
http://www.sqlite.org/src/info/4ae453ea7b
If that doesn't work, then go to the release timeline at http://www.sqlite.org/src/timeline?n=200&t=release&y=ci , choose a release, and download the ZIP file of it.
2) Unpack the ZIP archive somewhere. Go to that directory in cygwin. Execute these commands:
./configure
make
make sqlite3.dll
make install
3) Copy the sqlite3.exe and sqlite3.dll from the directory where make created them into somewhere on your path.
4) Once that's done, gem install sqlite3-ruby finally worked.
I was following this guide: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/240902
I know this has been closed for a while but I was having the same issue and this
helped. Install apt-cyg. First install subversion and wget through the standard
cygwin setup program. Then run the following commands:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
Now using apt-cyg install the sqlite3 development:
apt-cyg install libsqlite3-devel
and finally
$ gem install sqlite3-ruby
Building native extensions. This could take a while...
Fetching: sqlite3-ruby-1.3.3.gem (100%)
#######################################################
Hello! The sqlite3-ruby gem has changed it's name to just sqlite3. Rather than
installing `sqlite3-ruby`, you should install `sqlite3`. Please update your
dependencies accordingly.
Thanks from the Ruby sqlite3 team!
<3 <3 <3 <3
#######################################################
Successfully installed sqlite3-1.3.6
Successfully installed sqlite3-ruby-1.3.3
2 gems installed
Installing ri documentation for sqlite3-1.3.6...
Installing ri documentation for sqlite3-ruby-1.3.3...
Installing RDoc documentation for sqlite3-1.3.6...
Installing RDoc documentation for sqlite3-ruby-1.3.3...
I got it working by following these suggestions: http://www.skorks.com/2009/08/installing-and-using-sqlite-with-ruby-on-windows/
Basically you can download from sqlite.org, the DLL and shell file and make sure you copy the DLL in each of the ruby versions you have installed, in their /bin directory. You can place the shell file somewhere in your system path, I have a folder c:\bin. Then you can install pik gem install sqlite3
replace with sqlite3 (1.3.10-x64-mingw32) in Gemfile.lock worked for me.
i just installed MAMP on this iMac and the rubygems but when i run:
sudo gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
gives me
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
ERROR: could not find gem — locally or in a repository
ERROR: could not find gem –with-mysql-config=/usr/local/mysql/bin/mysql_config locally or in a repository
how can i install this gem ?
I found this and worked out perfectly:
you can go to http://www.tmtm.org/en/ruby/mysql/ to download the tar
file, and run the command below
# ruby ./install.rb
to install the mysql.rb
Use the following it worked with me
brew install mysql
Do you have the Xcode developer tools installed on Mac OS X? If not, I'd start there.
You can download them here: http://developer.apple.com/technologies/xcode.html
Once you've installed that, try again.
i'm still getting this
$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
* extconf.rb failed *
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
--with-mysql-config
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
You need the mysql development libs to compile it. If you were on linux you could use "yum install mysql-devel". Not sure about how to get them installed on a mac, but try downloading the connector libraries from here:
MySql Connector Downloads
You may have to pass in a --with-mysql-libs option to point to the directory when the C libraries are unpacked to. Hope this points you in the right direction.
Or you can just put the libraries in the default directory:
/usr/lib64/mysql
Download mysql-dev from mysql.com