Wrong JPEG library - ruby on rails- OS X - ruby

I keep getting this error any time i call any page that has a call that uses RMagick, but i can't figure out what library i'm missing, or what i need to install to get rid of this error. Does anyone have debugging suggestions?
Processing SimpleCaptchaController#simple_captcha (for 127.0.0.1 at 2010-01-14 14:24:24) [GET]
Parameters: {"image_style"=>"", "time"=>"1263500664", "simple_captcha_key"=>"13eec13214d2ce84b725d14c5877fcbe13308cf5", "distortion"=>""}
Could not dump header data for exception: not opened for reading
ArgumentError (unknown format: JPG):
/usr/local/lib/ruby/gems/1.8/gems/fiveruns-dash-ruby-0.8.10/lib/fiveruns/dash/instrument.rb:125:in `perform_action_without_rescue'
...
After re-installing based on this cache of the bellow attempted solution
i am getting this error:
Magick::ImageMagickError (Wrong JPEG library version: library is 62, caller expects 70 `' # jpeg.c/EmitMessage/232):

I had to:
sudo port uninstall jpeg
install image magic using this script on git:
http://github.com/masterkain/ImageMagick-sl
after i was able to install rmagick:
sudo gem install rmagick
now, no more problems.

Their site is down at the moment, but when it comes back online you should run this install script by Solomon White.
http://onrails.org/articles/2009/09/04/rmagick-from-source-on-snow-leopard

Related

Ruby on Rail running apache show index of when accessing the site

I have recently updated to Apache 2.4, and I am using Ruby on Rail to run my application. Following the upgrade, the site shows a content as seen in the image below, and the error on the log file shows this error message. I have tried using the 'Bundle Install' and checked the permission but that hasn't helped. Any advice would be greatly appreciated. Thanks
[ 2022-02-07 07:47:24.5559 8104/7efc89c8f700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/adminuser/hroot: An error occured while starting up the preloader.
Error ID: ba7e6074
Error details saved to: /tmp/passenger-error-RA01E9.html
Message from application: libmysqlclient.so.18: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-2.0.0-p353#hroot/gems/mysql2-0.3.14/lib/mysql2/mysql2.so (LoadError)
PassengerRuby /usr/local/rvm/gems/ruby-2.0.0-p353#hroot/wrappers/ruby
SetEnv GEM_HOME /root/.gem/ruby/1.9.1
This error shows a problem with the shared objects. You probably updated MySQL/MariaDB libraries with Apache and new libraries are incompatible with your mysql2 gem build. The solution is simple:
First, ensure you are using the ruby-2.0.0-p353#hroot RVM environment.
Then, execute the following command:
gem install mysql2 --version 0.3.14
This should rebuild your mysql2 gem for the new MySQL/MariaDB client libraries on your system.
this isn't the answer anyway but another method to run ruby (in my case Windows 10 ; if you use another OS try to find out how to modify inside index.php the ruby starter)
i post here an alternative method to use apache + php +... and ruby
https://stackoverflow.com/a/71733656/5781320

Issue getting wkhtmltoimage working on Amazon Linux / Ruby on Rails

It works fine on my development environment (osx), but I can't get it to work on the server.
in my gemfile
gem 'imgkit'
gem 'wkhtmltoimage-binary'
When I run:
kit = IMGKit.new(html, quality: 100)
img_binary = kit.to_img
I get this error
IMGKit::CommandFailedError: Command failed:
/var/www/myapp/shared/bundle/ruby/2.3.0/bin/wkhtmltoimage --height 0 --quality 100 --format jpg - -:
/var/www/myapp/shared/bundle/ruby/2.3.0/gems/wkhtmltoimage-binary-0.12.5/libexec/wkhtmltoimage-amd64:
error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
I've searched online and tried installing some more packages, but no success. Anyone able to help? Thanks.
Using 'wkhtmltoimage-binary', '~> 0.11.0.1.1' in the Gemfile fixed the issue for me. Found the solution here.

Wordnet::Similarity installation issue

When I install Wordnet::Similarity on mac, the following error occur:
usr/local/bin/perl "-Iblib/arch" "-Iblib/lib" build/Depthfiles.PL blib/lib/WordNet/synsetdepths.dat
Generating default depth files.
Can't load '/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle' for module Digest::SHA1: dlopen(/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle, 1): no suitable image found. Did find:
/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle: mach-o, but wrong architecture at /usr/local/lib/perl5/5.8.8/darwin-2level/DynaLoader.pm line 230.
at blib/lib/WordNet/Tools.pm line 76
Compilation failed in require at blib/lib/WordNet/Tools.pm line 76.
My attempt was to enter to the downloaded package directory from terminal and type:
perl Makefile.PL
make
make test
sudo make install
I made sure to have installed all prerequisite http://search.cpan.org/dist/WordNet-Similarity/doc/install.pod#Prerequisites. I suspect that this may be due to mac processor version with Perl interface. Any suggestion on how to fix this?
Install libdigest-sha-perl in Ubuntu 14.04 has solved this issue.
Download link:http://packages.ubuntu.com/trusty/amd64/perl/libdigest-sha-perl

httpie gives me an error on macosx 'HTTPConnection'

I'm working on macosx and I try to use httpie (with Symfony2 and FOSRestBundle).
I follow different tutorial on how to install httpie.
When I try to launch with: http httpie.org
I received the following error :
http: error: AttributeError: 'HTTPConnection' object has no attribute '_tunnel_host'
I can't find anything on Google.
Do I have to configure something special or do I have to install another thing ?
Thanks !
It looks like a bug. I'd try to update/reinstall HTTPie (pip install --force-reinstall --upgrade httpie), and fill a bug report if it doesn't help.

Error: Could not autoload /puppet/pops/binder/hiera2/json_backend: no such file to load -- json

I try to setup a Vagrant instance with a puphpet script and get the following error message:
Info: Loading facts in /etc/puppet/modules/git/lib/facter/git_exec_path.rb
Info: Loading facts in /etc/puppet/modules/git/lib/facter/git_version.rb
Error: Could not autoload /puppet/pops/binder/hiera2/json_backend: no such file to load -- json
Error: Could not autoload /puppet/pops/binder/hiera2/json_backend: no such file to load -- json on node devbox.local
Error: Could not autoload /puppet/pops/binder/hiera2/json_backend: no such file to load -- json on node devbox.local
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
Does anybody as a hint what might be wrong?
Thanks a lot for the help!!!
Try adding "gem install json" before "gem install librarian-puppet" in the file {vagrant path}/puphpet/shell/librarian-puppet-vagrant.sh (probably somewhere around line 72)
I was having a similar issue and found the above solution at https://github.com/puphpet/puphpet/issues/455. My issue had nothing to do with the proxy stuff mentioned there, however the json errors were similar to mine. Seems to work for me.
I've updated Vagrant to 1.4.3 and I'm starting to get the same error, so it's possible it's a bug that's only appeared in the latest revision.
Not sure how you would roll back to 1.3.5, remove and re-install?

Resources