Skip to main content

Exception ArgumentError in PhusionPassenger::Rack::ApplicationSpawner (invalid byte sequence in UTF-8)

I’ve got this error in redmine after upgrading to ruby 1.9.

[ pid=17020 thr=20031940 file=utils.rb:176 time=2012-09-07 01:42:47.904 ]: *** Exception ArgumentError in PhusionPassenger::Rack::ApplicationSpawner (invalid byte sequence in UTF-8) (process 17020, thread #<Thread:0x00000002635388>):
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:346:in `block (2 levels) in load_magic'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:345:in `each'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:345:in `block in load_magic'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:337:in `open'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:337:in `load_magic'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:377:in `block in <module:MIME>'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:372:in `each'

To solve this error edit shared-mime-info.rb file (shared-mime-info gem) and change the line open(file) in load_magic method:

336  def load_magic(file)
337        open(file) { |f|

with this:

336     def load_magic(file)
337        open(file,  'r:ASCII-8BIT') { |f|

restart web server that is all.

Could not find rake- in any of the sources (Bundler::GemNotFound)

After installing Redmine 2.x I got this error:

*** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Could not find rake- in any of the sources (Bundler::GemNotFound)) (process 16175):
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `materialize'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'

To solve this I run this command in the redmine application directory

/var/www/redmine/bundle install --path vendor/bundle

bundle:2:in `require’: no such file to load — bundler (LoadError)

I installed Bundler gem during the Redmine installation

# gem install bundler
Successfully installed bundler-1.1.5
1 gem installed
Installing ri documentation for bundler-1.1.5...
Installing RDoc documentation for bundler-1.1.5...

And I got this error:

# bundle
/usr/bin/bundle:2:in `require': no such file to load -- bundler (LoadError)
	from /usr/bin/bundle:2

It seemed that it was not able to load required gem. I found required gem bundler.rb under “/var/lib/gems/1.8/gems/bundler-1.1.5/lib/”

# locate bundler.rb

As a workaround I edited the file /usr/bin/bundle and forced to load the required path:

#!/usr/bin/env ruby
$LOAD_PATH << "/var/lib/gems/1.8/gems/bundler-1.1.5/lib/"
require 'bundler'

And got it working

# bundle
Fetching gem metadata from
Installing rake ( 
Installing i18n (0.6.0) 
Installing multi_json (1.3.6) 

Proxmox 2 console freezes and browser crashes with 64 bits java plugin


I had a very critical issue with Proxmox 2 web interface in my system, when I opened a vnc console my browser crashed and I could not access to my virtual machines.  This can be very painful when you have something wrong in your virtual machine and you can’t access to it. I had this issue only in 64 bits ubuntu system, the behaviour is the same for Firefox, Chrome and Opera. Same system/configuration in 32 bits is working Ok.

Digging into the problem I encountered that the issue came from the java plugin that is used for vnc viewer. Specifically from icedtea package from OpenJDK. To solve this issue I installed Sun JRE.

To install Sun JRE follow these steps:

– Go to and download 64 bits linux package.

– Untar downloaded package and move to /opt/java/java-sun/

# tar xzvf jre-7u5-linux-x64.tar.gz
# mkdir -p /opt/java/java-sun
# mv jre1.7.0_05/ /opt/java/java-sun/

– Remove existing icedtea plugin:

# apt-get remove icedtea-6-plugin icedtea-7-plugin

– Set Sun JRE as default in the system:

# update-alternatives --install "/usr/bin/java" "java" "/opt/java/java-sun/jre1.7.0_05/bin/java" 1

– Configure your desired java version in your system:

# update-alternatives --config java

– Configure java browser plugin:

First remove any ~/.mozilla/plugins/libjava* file if existing.

# ln -s /opt/java/java-sun/jre1.7.0_05/lib/amd64/ ~/.mozilla/plugins/

– Restart the brower and verify the java plugin. Got to this test page and verify that the browser can run the applet correctly.

Now VNC viewer works great on Firefox and Chrome.

Cannot detect your system information, you have to install ionCube loader manually

When accesing to the RVSiteBuilder in CPANEL I got the this error:

“Cannot detect your system information, you have to install ionCube loader manually.
Please contact your provider.”

The IonCube loader was correctly installed in /ioncube/, the solution for this error was to run the following script on the server:

# perl /var/cpanel/rvglobalsoft/rvsitebuilder/panelmenus/cpanel/scripts/
Find php.ini...

PHP configulation for cPanel(3rdparty) has been successfully updated.
Using php Loader: IonCubeLoader
Updating md5sum list
Fetching (connected:0).......(request attempt 1/12)...Resolving attempt 1/65)...
	Fetching (connected:0).......(request attempt 1/3)......connecting to success......Done
...found 42 host(s) from mirror_addr_list......searching for mirrors (mirror search attempt 1/3)......loaded mirror speeds from cache......mirror search success...@ success......Done
Installing IonCubeLoader
Determining PHP version
Installing IonCube Loader binaries
Activating IonCube Loader extension in /usr/local/cpanel/3rdparty/etc/php.ini
IonCube Loader extension activated