Showing posts with label yaml. Show all posts
Showing posts with label yaml. Show all posts

Friday, November 16, 2012

libyaml / psych / rvm / zlib issues

Previous: Remount thumb drive read-write

Every time I set up a new Ubuntu instance for Ruby development, I run into the same problem. After installing rvm, when I try to install a gem it complains about not being able to find psych for yaml and not finding zlib. I can't seem to get the hang of this. As usual, I found a number of different solutions online, and each of them solved the problem for some people and not for others. FWIW, this is what corrected the problem for me on a fresh instance of Ubuntu 12.10:

sudo apt-get install zlib1g-dev
sudo apt-get install libyaml-dev
rvm reinstall 1.9.3
Maybe this will help you if you're having a similar problem.

Next: Installing VMware Player 5.0

Saturday, June 25, 2011

Getting Instiki wiki working on Ubuntu 11.04

Previous: Installing rvm on Ubuntu 11.04

I started by copying my backup of the whole directory .wiki from an external drive to /home/.wiki.
Then I ran the following commands:
rvm gem install bundler
sudo apt-get install
libxml2-dev
libxslt1-dev
sqlite3
libsqlite3-dev
cd .wiki
bundle
Bundler installed other components Instiki uses, including nokogiri, rubyzip, and sqlite3-ruby.

Instiki did not start, and reported this error:
/home/dave/.rvm/rubies/ruby-1.9.2-p180/lib
/ruby/1.9.1/psych.rb:148:in `parse':
couldn't parse YAML at line 18 column 14 (Psych::SyntaxError)


I found an explanation and workaround by vicvega on
Stack Overflow. I added the lines
require 'yaml'
YAML::ENGINE.yamler= 'syck'
at the top of Instiki's config/boot.rb file (just above the comment that reads, "Don't change this file!"), and Instiki started up clean. In a nutshell, the problem was that bundler uses psych as the default yaml parser, psych is not compatible with rails, and Instiki is a rails app.

In .bash_aliases I added a line to start the wiki conveniently:
alias wiki=~/.wiki/instiki


Next: Ubuntu 11.04 on Dell Vostro 3550 - FAIL