when I run gem install rmagick-2.13.1.gem from the directory in which rmagick-2.13.1.gem is I get an Error saying that it failed to build gem native extension, below which it says
c:/Ruby192/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5 ... yes
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.
From what I know reading the answers to FAQs on http://rmagick.rubyforge.org/install-faq.html#os, rmagick should come bundled with ImageMagick Windows Installer. The answers also mention rmagick-win32.gem. I haven't seen it anywhere. That's why I'll assume that rmagick-2.13.1.gem is what I need since it's the only one availaible, considering that FAQs refer to the older version of rmagick. So, I'm really confused about what the damned problem is.
I also took a look at mkmf.log file and the only thing that I've found there is
checking for Ruby version >= 1.8.5 ... yes
This whole thing confuses the hell out of me. So, any help would be hugely appreciated. Thanks a lot in advance.
Download zip file from:
https://github.com/rmagick/rmagick/downloads
Unzip it in a local directory
CD to that directory and type
gem install rmagick --local
Done.
If you get errors you might want to read the Readme.html file in the Zipfile
Exactly same problem.The "Read Me" in the downloaded Zip file now contains only this:
Hi, everyone -
We are no longer able to maintain
RMagick and are looking for someone or
some people to take over maintenance
of it. If you're interested or want
more details, please let us know at
admin#obtdev.com!
It is a cool project, written in C and
Ruby, with lots of great developers
relying on it. The code, originally
written by Tim Hunter, is clean and
easy-to-understand, and there are a
lot of directions you could take it to
make it even more useful.
We've had to stop maintaining it due
to ever-increasing constraints on our
time.
Thanks,
- Benjamin and Omer.
Try
gem install win32-service --platform=mswin32
gem install rmagick --platform=mswin32
First of all clear your path environment variables. (This is the main step that people often skip, but very important). This is the main reason for the error you're facing.
Then install the rails installer (2.0.0) from here : http://railsinstaller.org/en
It'll set up ruby, rails, and everything else you need. This will also set up your environment path variables for you as well.
Next install imagemagick 6.7.9.9 or lower and while installing check the option to include C headers. Make sure you install it within the rails installer folder.
Then type this in your command prompt path=c:\RailsInstaller\ImageMagick-6.7.9-Q8;%path% or whatever version you have.
Then type
gem install rmagick -- '--with-opt-dir="c:\RailsInstaller\ImageMagick-6.7.9-Q8"'
Finally edit C:\RailsInstaller\Ruby2.0.0\setup_environment.bat to include the path to ImageMagic
At line 25: SET PATH=c:\RailsInstaller\ImageMagick-6.7.9-Q8; or whatever version you have
use rmagick2 for
Ruby 1.8.2 and later, including Ruby 1.9
ImageMagick 6.3.0-7 or later
RMagick 2 is the future of RMagick. This is the version that will get new methods and support new ImageMagick features.
Related
I'm trying to initialize a new rails app on windows, and running rails new <appname> generates everything up to vendor/assets/stylesheets/.keep, but when bundle install is run, rails generates this error:
Checksum of /versions does not match the checksum provided by server! Something is wrong.
I'm not sure what's causing this, as I've done nothing to rails itself. Any help is appreciated.
Edit: If it's an error caused by windows being finicky, I have the option of moving to Linux, but I'd like to know what's wrong first.
I had the same issue using windows, and was able to solve it by uninstalling bundler and installing an older version.
rails new <appname>
gem uninstall bundler
gem install bundler -v 1.9
cd <appname>
bundle install
That did it for me!
In my case there was a *.pre.1 version and I chose to uninstall that particular version and then "bundle install" worked.
Try removing your ruby cache folder and then try again. So for example if you are on Linux machine and you are using rbenv and say ruby 2.1.5 folder. Your path would be similar to something like (Not sure where on windows ruby is stored):
~/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/cache/
Removing this folder and trying bundle install again should resolve the issue.
It will be great, if you move to a Linux machine.
On windows it's a hell to pay in my 5 years of experience what i have learned is not to mess with (ror) or (rs) in windows. here's a cheeky thing you can do an easy way. I believe you are using github as repo, as a editor you are using sublime if thats is a case open your gemfile you will see check the image or
try to clear cache on your server or update the gems.
I had this same exact error and solved it the following way. I think you are missing the ruby DevKit being installed.
Go here http://rubyinstaller.org/downloads/ and download/install the latest 32-bit Ruby version (as of writing this 2.2.4, you will need it for the web-console gem)
Make sure to add your ruby\bin folder to your environmental path variable
The trick is hidden near the bottom-left of the same page under the "Development Kit" section. You need to download and extract the right one into a permanent location (as of writing this for 32-bit - DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe)
After extracting the files, go into the main directory and run "ruby dk.rb init" followed by "ruby dk.rb install" (More information can be found here
That fixed it for me and i can now fully install with no checksum issues
This problem began when i tried to run my app. I wrote rails s and the console said me Could not find sdoc-0.4.1 in any of the sources Run bundle install to install missing gems. Then i wrote bundle install and the message that appeared was Checksum of /versions does not match the checksum provided by server! Something is wrong.
I solve this problem following this steps:
Wrote bundle install
The console said me Could not find sdoc-0.4.1 in any of the sources
Then i reinstalled this gem with gem install sdoc -v 0.4.1
I tried again to write rails s and it's was solved.
`
I am new to ruby on rails, and need an upload image and upload file control. I saw this (http://railscasts.com/episodes/134-paperclip) and it is what I need. But for the image resizing feature, it says it needs imagemagick.
I have been basically all day trying to install this, following multiple tutorials which are pretty much like this (https://github.com/rmagick/rmagick/wiki/Installing-on-Windows), or telling me to use the rmagick gem from rubyforge.org (which seems to be down since 2013).
When I follow the instructions I always get the following error when running gem install rmagick:
ERROR: Failed to build gem native extension.
Could not create Makefile due to some reason, probably lack of necessary libraries and/or header.
Could anyone please point me to an up to date tutorial or way of installing imagemagick? Or am I using something too old, I read on a post it has not been committed for years on github?
Also, if there is a better and easier way to upload files and images with rails, suggestions are welcome, as I don't HAVE to use paperclip and imagemagick.
Thanks
Finally got it installed.
I used version 6.7.9-9 and followed the second answer here (the one where it says to use the Ruby CMD and has some ** in the paths): Ruby on Rails RMagick on Windows 7
I'm not exactly a seasoned veteran of the Rails world, but from what I've seen, I would definitely like to use bootstrap on my Rails projects.
i'm running windows 7 and I'm kind a married to it. I have read everything I can find on this topic and is it just not possible to install bootstrap-rails on windows?
Every time I try to install either therubyracer or libv8 I get fatal errors that I can't resolve.
It won't install twitter-bootstrap-rails because I don't have those other two.
Can someone either tell me how to install bootstrap on my windows box or point me to the information?
I am so frustrated, i've been stuck with this for a few months now.
Give bootstrap-sass a try. This should get around the need to compile the style sheets into less, since they are ported to sass with this project. See Section A for gems to include in your Gemfile.
Try this:
gem install libv8 -- --with-system-v8
Because libv8 is the interface for the V8 engine used by therubyracer,
you may need to use libv8, even if you have V8 installed already. If
you wish to use your own V8 installation, rather than have it built
for you, use the --with-system-v8 option.
Source
I'm would never suggest cheating on your operating system, I'm just saying you could dual-boot and she would never know.
Bootstrap-Sass works for me too.
So I was following the steps on Hivelogic to get ruby on rails setup on my machine. After compiling and installing, I used the which ruby command to double check it installed in the right place. It did not. I was able to install the Rails and MySQL gems though, but both POW and localhost:3000 don't work.
Is there anything wrong with having it in the usr/bin directory instead of usr/local/bin? My usr/local/bin is practically empty, but usr/bin has a ton of files in it.
Edit: I reinstalled ruby to usr/local/bin but now Rails won't install. Is it a problem that it's already installed in usr/bin?
That page is a few years old. The current best practice for Mac and Linux is to use rvm. You can see, even Hivelogic uses rvm now (though I'm not sure how I feel about installing it system wide).
Anything that recommends installing from source as the first option instead of a last-resort fallback is probably bad advice. It's better to install using a package manager like MacPorts or Homebrew both of which have current versions of Ruby 1.8 and 1.9.
MacPorts installs everything in /opt specifically to avoid conflict with system files. From time to time Apple will distribute an update that patches ruby and this can mess up anything you have in the way of dependencies if you've been using a modified /usr/bin/ruby. Generally the system ruby is supposed to be left as-is.
You can replace the "compile ruby" step with an installer like that and save yourself a lot of trouble in the future. Just be sure to have /opt/local/bin as one of the first items in your PATH just as you would for other solutions.
Since installing Ruby and Rails and some kind of database can be a confusing process, it seems like there should be a meta-installer to help you through the process.
So I finally managed to get rails installed in the correct spot. I had to change the line in my .profile to export PATH="/usr/local/bin:$PATH" and then do a sudo gem update --system after installing rubygems before rails could actually be installed.
RVM and Homebrew did not help at all.
EDIT: Since people have a problem with this answer, I'm giving an update. I have since installed RVM and am liking it, but only because I have a friend I ask all my questions to, as RVM is really confusing if you're not used to doing a lot on the command line. I needed help from him to install it because I didn't have any of the bash files, and thought they were hiding somewhere. If you're missing the bash files, just create them yourself. This took a long time to get working, but now I apparently have it setup right.
I really need help with Rubygems (that's the package manager for ruby). Since I'm behind a proxy, I've given up all hope of it working automatically, so I had to download a lot of packages manually and install them for rails to install. Now, I'm getting an error message:
Rails requires RubyGems >= 1.3.2 (...)
Once again, I manually downloaded rubygems-1.3.2.gem and installed it, however, it still doesn't work and gem -v shows 1.3.1. Help. Also, I can assure it that unless gem has HTTP1.1 Auth Proxy support, there is no way it by itself will be able to contact its server...
Before running rubygems commands, you should try something like (for windows)
set http_proxy=user:password#ip:port
Or export for linux, I guess.
It seems that one can simply download the source tarballs, untar them and use setup.rb to install the update. More information on it here.
I did this and was very pleased with the result (no problem!).