I've installed ImageMagick, added the proper line to development.rb, but Paperclip still won't let me upload photos - ruby-on-rails-3

Using Windows 7. I've installed ImageMagick in C:\Program Files\, and I've tried adding the line
Paperclip.options[:command_path] = "C:\Program Files"
as well as
Paperclip.options[:command_path] = "C:\Program Files\ImageMagick-6.6.7-Q16"
to config/environment/development.rb. I still get the following error when trying to upload an image:
/Local/Temp/stream20110212-5000-s69b6a.png is not recognized by the 'identify' command.
Any ideas?

I had the same issue with a rails app using paperclip. In my case I'm on a Mac, but the error was:
/var/folders/es/es6TeBjk2RasAk+1YvsY6++++TI/-Tmp-/stream20110214-45420-usux9f-0.png is not recognized by the 'identify' command.
It seems to occur if ImageMagick (IM) is not compiled with PNG support. The windows binaries should come with PNG as one of the default delegates in the installation files.
Try reinstalling the latest version if IM. The alternate option is to recompile ImageMagick with the PNG library available. This is how I fixed this issue on my Mac.
For windows, recompilation is not so simple. ImageMagick offer a download of the libpng library from their delegates folder. They also supply instructions on an Advanced windows install using delegates. It requires the MS Visual Studio IDE to compile.

Related

SCIP Python Installation Issue Windows with pip

Hello community / developers,
I am currently trying to install SCIP with python and found that there is Windows Support and a pip installer based on https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/INSTALL.md.
Nevertheless I run into a problem "Cannot open include file"
Below is a list of the things I performed to get to this step.
Download Python Anaconda 2.7 64 bit
Install with all checkboxes as they are
Download PyCharm Community edition
Click 64 bit desktop link, and associate with .py checkboxes
Open CMD > write: easy_install -U pip
Download Visual C++ Compiler for Python 2.7
Setup folder structure and downloaded header files
CMD > pip install pyscipopt leads to error:
C:\Users\UserName\Downloads\SCIPOPTDIR\include\scip/def.h(32) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
error: command 'C:\Users\UserName\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2
My environment variables and folder directory can be found here:
http://imgur.com/a/mJRva
Help is very much appreciated,
Kind regards
The error message says your missing "stdint.h". This is because you don't have a recent Visual Studio version. You probably use the one that came with your Python installation. Try installing the latest Visual Studio to fix this issue.
You might want to look at this question:
Why Microsoft Visual Studio cannot find <stdint.h>?
PySCIPOpt needs a C/C++ linker to build the Python module - although it's already precompiled on PyPI.
Alright, I figured it out. I needed to
(1) Install Python 3.6 instead of Python 2.7 (both Anaconda)
(2) Afterwards pip installation worked
(3) I moved the library files in the lib folder
(4) Now I can execute the examples.
Interestingly, I get an unresolved reference error although the code works fine (I assume this is a bug of Pycharm/scipy?) Link to picture: https://www.dropbox.com/s/d8pf6dkwuz9cwto/scip_python.png?dl=0

Rubymine 6.0.3 Startup Error on Ubuntu

I am installing RubyMine on Ubuntu 15.10. I downloaded the .exe file and installed it using Wine installer. The installation gone pretty well.
But when I tried to run the RubyMine, I am getting an error. I am attaching the screenshot of the error.
I tried searching, I got answers related to Mac Os to remove the .jar extensions. But I couldn't find any regarding Ubuntu.
Anyhelp is appreciated.Thank you.

Tess4J - Native library (linux-x86-64/libtesseract.so) not found in resource path

I'm using Tess4J (JNA wrapper around tesseract), and trying to call tess.doOCR(myFile) to OCR text from a single-page PDF.
I have GhostScript installed (by using yum install ghostscript), gs -h works correctly.
My app server is using 64-bit JVM, and I have gsdll64.dll, and the 64-bit tesseract dll's liblept168.dll and libtesseract302.dll in the class path.
When tess.doOCR(myFile) is called, this is logged:
GPL Ghostscript 8.70 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
But then it just stops there. The program doesn't go any further.
UPDATE --
It looks like the real issue is from this error:
java.lang.UnsatisfiedLinkError: Unable to load library 'tesseract': Native library (linux-x86-64/libtesseract.so) not found in resource path
After looking around a lot, I don't see a convenient place to find this libtesseract.so file, and I'm not sure what it takes to get this onto my Linux app server. I read that maybe I need to download some C++ runtime, but I don't see a Linux download for that. Any advice would be much appreciated.
Or is this something to do with a symbolic link?
The Fix was simple for me,just do sudo apt-get install tesseract-ocr from the command line. For linux you dont need to worry about the DDL librarires or the jvm version. Installing tessearct from apt-get will do the trick.
Those DLLs are for Windows. For Linux, you'll need to install or build from Tesseract source.
That GS version, 8.70, is quite old. The latest Ghost4J library that Tess4J uses is not compatible with that.
Tess4J should include required libraries. However, you need to extract them first.
This should do the trick:
File tmpFolder = LoadLibs.extractTessResources("win32-x86-64"); // replace platform
System.setProperty("java.library.path", tmpFolder.getPath());
You should replace the argument of extractTessResources(..) with your platform. You can find possible options by looking into the Tess4J jar file.
This way you need not to install Tesseract on your system.
Recently I wrote a blog post about Tess4J in which I used this technique. Maybe it can help if you need further information or a running example project.
sudo apt-get update
sudo apt-get install tesseract-ocr
download test data by git
https://github.com/tesseract-ocr/tessdata

Install SQL Developer mac osx 10.9.1

i'm trying to install Oracle's SQL Developer in my macbook pro OSX 10.9.1 but I can't understand how to do it. I download a .gz file which I unzip to get an installer but all I have is an unknown file called sqldeveloper-4.0.0.13-1.80-macosx. It is not a .dmg or something so i don't know what to do whith it.
I've read that i'm supposed to run over the extracted directory something like sh sqldeveloper.sh from the terminal but that file isn't there, just the one mentioned above.
thanks
Extraction problem, "The Unarchiver" utility produced the unknown file, I decompressed the file download from Oracle's website with the Archive Utility and I got the installation file

Trying to use ffi and typhoeus gems on windows but I need libcurl

I'm pretty new to rails and I'm trying to get an application working. It's currently using ffi and typhoeus which need a version of libcurl. How can I install a version of libcurl for Windows 7.
Thanks!
There's one option I implemented but couldn't install only libcurl packages. Cygwin provides lots of the packages and libraries used for development in Linux for being installed on Windows (included curl, libcurl, libcurl-dev, etc).
http://www.cygwin.com/
It worked for me in windows 7 64 bit OS.
Here's another solution for that specific gem
https://github.com/typhoeus/typhoeus/pull/151/files
Greetings.
Answer that worked for me was:
Download cURL from the following URL: https://curl.haxx.se/windows/ (I chose 64bit because that's the system I'm using)
Go into the archive and browse to /bin
Locate libcurl_x64.dll (it may be just libcurl.dll)
Extract to your local drive
Rename it to libcurl.dll if it has the _x64 suffix
Cut + paste the file into the /bin directory of your Ruby installatio
It should work after this