Rails Error on Windows: ImageMagick/GraphicsMagick is not installed - ruby-on-rails

I get this error when i ran my rails app on my Windows Localhost when I tried to upload an image.
I have a "product" model and I am using Mini_Magick with CarrierWave for uploading the product's image.
Image Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: ImageMagick/GraphicsMagick is not installed
I have done the "bundle install" command after putting mini_magick gem in my gem-file and I have checked that Imagemagick is installed by running "convert" everything works fine... What could be the problem?

Have you installed GraphicsMagick on your machine? You will need this installed locally if your doing any kind of image manipulation with your uploads, which it appears you are.
Downloads can be found here:
ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/windows/

Another advise: this error happened to me even after installing GraphicsMagick, I solved it by restarting visual studio code, which is the IDE I'm using. So, be ware of restarting the terminal you are using to run rails after installing GraphicsMagick

Related

ruby on rails bootsy image upload not working

I'm new to ruby on rails, and I'm trying to add a WYSIWYG editor to my website. I have installed bootsy following the instructions on https://github.com/volmer/bootsy. It is giving me this error whenever I try to upload an image: Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: ImageMagick/GraphicsMagick is not installed
What is going on?
If you see bootsy's readme requirements, you will notice the following:
ImageMagick or GraphicsMagick (for MiniMagick)
This means that to run the plugin you will need ImageMagick installed on your local machine. This is very easy to do.
If you are on Mac:
brew install imagemagick
On Ubuntu:
sudo apt-get install imagemagick
For the other operating systems, you can read more on ImageMagick's official website.

Rails initialization checksum error

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.
`

installation of ruby on rails using railsinstaller for windows

i had downloaded package railsinstaller for windows and had successfully installed it.
After that i followed these steps and got that window of localhost:3000 running successfully.
But now when i again starts it following error(in the image link) comes.
http://tinypic.com/r/11ch4ix/6
what should i do to solve this??
ruby -v command was also applied and everything is installed properly.
Thanks in advance!
Ruby on Rails needs a Javascript runtime installed on your computer.
First you should try putting the ExecJS gem in comment again (in your gemfile.rb).
Else you could install NodeJS, as it contains a Javascript runtime (V8 - used by Chrome).
Good luck!

Spree 1.1.0 demo missing product images

I'm on mac osx, rails 3.2.3, ruby 1.9.3-p194, spree 1.1.0, rvm 1.10.2. ImageMagick was installed using homebrew and is on version 6.7.5-7
First I installed spree gem install spree
Then created new rails project rails new mystore
To install spree to my rails app I did cd mystore and then spree install
The site runs fine but I don't see any images when I run the demo site. I also see that the public/spree/products folder is empty.
Any idea why the images were never created during installation?
Turns out that imagemagick wasn't installed properly on my system. You can check this by running identify at the command line. If it errors then imagemagick isn't installed right.
Once I got imagemagick installed properly I re-created the demo project and the images showed up.
It was hard to tell that anything wrong because the spree installation didn't throw any errors. So for anyone that runs into this problem, just check to make sure imagemagick is working.

Heroku: Running imagemagick with paperclip

I have installed image magick on my mac os x computer and now I want to deploy it to heroku. I've installed the the paperclip plugin on heroku but I get this error when uploading an image:
Paperclip::CommandNotFoundError
I had this error before when I didn't have imagemagick instaledl on my computer before but now that I want to deploy it, how do I get image magick to work on heroku?
Do you have the RMagick gem included in your app on Heroku? It's necessary for interfacing between your Ruby code and ImageMagick.
ImageMagick is part of the Heroku platform by default, but you have to specify that you need the RMagick gem for your app. I'm guessing you have this installed locally so it works there, but it's missing from your Gemfile or gems manifest (depending on Heroku stack version).
Try to remove the Paperclip.options[:command_path] = "/path/to/" when deploying to heroku.
This solved the issue for me.
Add the following to your gemfile...
gem 'rmagick'

Resources