Pagodabox Terminal Client on Slackware

Pagodabox has a terminal client for Linux written in ruby. It is the only tool that can be used to tunnel MySQL database to your local machine but this client does not work correctly with Slackware Linux.

What are we talking about?

Pagodabox command line tool for Linux is a ruby gem. To install the gem, simply run:

gem install pagoda

This will install the pagoda gem and all its dependencies. To use the gem, such as creating a database tunnel, we run them on the terminal. For example:

pagoda --version

Above should display the version of the said tool, but instead, it throws an error that says:

lysender@darkstar:~$ pagoda
/home/lysender/.gem/ruby/1.9.1/gems/gli-1.3.5/lib/gli.rb:531:in 'verify_unused_in_option': a has already been specified as a flag in global options (ArgumentError)
  from /home/lysender/.gem/ruby/1.9.1/gems/gli-1.3.5/lib/gli.rb:523:in 'block in verify_unused'
  from /home/lysender/.gem/ruby/1.9.1/gems/gli-1.3.5/lib/gli.rb:522:in 'each'
  from /home/lysender/.gem/ruby/1.9.1/gems/gli-1.3.5/lib/gli.rb:522:in 'verify_unused'
  from /home/lysender/.gem/ruby/1.9.1/gems/gli-1.3.5/lib/gli.rb:122:in 'flag'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/lib/pagoda/cli/commands/clone.rb:7:in 'block in <top (required)>'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/lib/pagoda/cli/override.rb:14:in 'instance_eval'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/lib/pagoda/cli/override.rb:14:in 'command'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/lib/pagoda/cli/commands/clone.rb:3:in '<top (required)>'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/lib/pagoda/cli/commands.rb:1:in 'require'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/lib/pagoda/cli/commands.rb:1:in '<top (required)>'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/lib/pagoda/cli.rb:2:in 'require'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/lib/pagoda/cli.rb:2:in '<top (required)>'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/bin/pagoda:33:in 'require'
  from /home/lysender/.gem/ruby/1.9.1/gems/pagoda-0.5.0/bin/pagoda:33:in '<top (required)>'
  from /usr/bin/pagoda:19:in 'load'
  from /usr/bin/pagoda:19:in '<main>'
lysender@darkstar:~$

If you are lucky enough, you will not get the error above, but for me following Slackware current, it got this bunch of errors.

Asking for help

I immediately ask for help on the Pagodabox help center and here is my post. I also asked for help in Slackware forum and I got a very helpful response that leads mo to solving the problem.

The Problem

The real problem was not with the tool itself but because of the ruby version. I am currently using ruby 1.9.1 and as they confirmed, there are several known problems with that specific version.

The Solution

The solution is to use RVM – ruby version manager. With these tool, you can keep several versions of ruby without uninstalling the current version. There are options to install but I choose the system wide install which means I am going to install it as root.

bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

After installing rvm, simply exit the root session and re-open a new session (if you are a su user). The recommended version that works well is the ruby version 1.8.7, so we are going to install that version using rvm. Run this as root.

rvm install 1.8.7

Then finally, switch the version system wide.

rvm use 1.8.7

To verify that we are now using the 1.8.7 version, simply run:

ruby --version

Finally

After installing and switching to the older version of ruby, we need to uninstall the pagoda gem and install it again for the older version of ruby. To uninstall, simply run:

gem uninstall pagoda
gem uninstall pagoda-client
gem uninstall pagoda-tunnel
gem uninstall gli

Then, install them again:

gem install pagoda

When done, you should be able to run pagoda client successfully.

pagoda

Enjoy!

This entry was posted in Hosting, Slackware and tagged , , , , , , , . Bookmark the permalink.

Related Posts

6 Responses to Pagodabox Terminal Client on Slackware

  1. Artjom Kurapov says:

    captcha errors

  2. Hey, I can’t post a comment to your article
    http://blog.lysender.com/2011/02/kohana-3-1-migration-unit-testing/
    says something about captcha error, though I can’t see any captcha in commenting

    In there – I dont see where suppress request comes from. Its nowhere in Kohana (3.2 here) to be found, thus index.php always returns full frontpage HTML code.

  3. Ok, looks like your spam filter doesn’t like CAPS

  4. or.. underscore with caps? SUPPRESS REQUEST

  5. lysender says:

    Hi Artjom,

    I have replied you on that post. Sorry for the inconvenience, I am using some sort of invisible captcha that requires JavaScript.

  6. Pingback: Deploy yii on pagoda box « yiideveloper

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>