$ gem environment | grep "EXECUTABLE DIRECTORY"
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
$ export PATH=$PATH:/var/lib/gems/1.8/bin/
Friday, August 19, 2011
Ruby Gem executables
Showoff dependencies
$ git clone git@github.com:bluegraybox/showoff.git
Cloning into showoff...
...
$ cd showoff/
$ gem build showoff.gemspec
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- parslet (LoadError)
...
$ sudo gem install showoff
[sudo] password for colin:
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Error installing showoff:
ERROR: Failed to build gem native extension.
...
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
...
$ sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
...
$ sudo apt-get install libreadline-ruby1.8 libruby1.8 libopenssl-ruby
...
$ sudo apt-get install libxslt-dev libxml2-dev
...
$ sudo gem install nokogiri
...
$ sudo gem install showoff
Building native extensions. This could take a while...
Successfully installed json-1.5.3
Successfully installed gli-1.3.2
Successfully installed showoff-0.4.2
...
$ sudo gem uninstall showoff
...
$ gem build showoff.gemspec
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- parslet (LoadError)
...
$ sudo gem install parslet
...
$ gem build showoff.gemspec
...
$ sudo gem install -l -n . showoff
Successfully installed showoff-0.5.1
...
Thursday, June 23, 2011
Unwedging Ubuntu
Upgraded my Linux desktop to Ubuntu 11.04. Kicked it off before I went to bed. Woke up sometime in the middle of the night and wandered down to check on it. It had gotten wedged at some point. The only thing to do was reboot.
It came back up unable to mount the / partition (the only non-swap partition). It dropped me to a command prompt with / mounted read-only. e2fsck reported everything ok. So, what up?
Spent a while last night poking at it and Googling around, to no avail. Got a sysadmin buddy of mine to drop by. He was also largely mystified. Eventually, we stumbled across this post, which sounded pretty close to my symptoms. Tried it; it worked.
So, for posterity, reference, and backup, here's the fix:
The instructions also say to remount the drive read-only, but that failed on "drive busy", and didn't seem to make a difference.
It came back up unable to mount the / partition (the only non-swap partition). It dropped me to a command prompt with / mounted read-only. e2fsck reported everything ok. So, what up?
Spent a while last night poking at it and Googling around, to no avail. Got a sysadmin buddy of mine to drop by. He was also largely mystified. Eventually, we stumbled across this post, which sounded pretty close to my symptoms. Tried it; it worked.
So, for posterity, reference, and backup, here's the fix:
mount -o remount,rw /
dpkg --configure -a
sync
reboot
The instructions also say to remount the drive read-only, but that failed on "drive busy", and didn't seem to make a difference.
Thursday, April 28, 2011
LaTeX
I'm avoiding the near-obligatory puns.
LaTeX is a document formatting language. Conceptually, it's kinda in the same ballpark as HTML; you have text with special bits of text mixed in that explain how to display it. LaTeX is geared for print media, though, so it's got a bunch of extra stuff thrown in. It's specifically designed for formatting books (or even more specifically, one book in particular). I'm just starting to play with it, but it's got features for managing footnotes, displaying mathematical formulas, etc.
I'm tinkering with it because I want to print something out on paper, and I care about how it's laid out. Also just because I want to learn it. I'm designing a sort of weekly reminder sheet. I want it to be two columns so I can fold it in half lengthwise. One column is tasks, the other is events. It'll look something like this:
The LaTeX code to do this is below. To create a PDF of it, run the
LaTeX is a document formatting language. Conceptually, it's kinda in the same ballpark as HTML; you have text with special bits of text mixed in that explain how to display it. LaTeX is geared for print media, though, so it's got a bunch of extra stuff thrown in. It's specifically designed for formatting books (or even more specifically, one book in particular). I'm just starting to play with it, but it's got features for managing footnotes, displaying mathematical formulas, etc.
I'm tinkering with it because I want to print something out on paper, and I care about how it's laid out. Also just because I want to learn it. I'm designing a sort of weekly reminder sheet. I want it to be two columns so I can fold it in half lengthwise. One column is tasks, the other is events. It'll look something like this:
Errands
Household
| Monday Tuesday
Wednesday
Thursday
Friday Saturday
Sunday |
The LaTeX code to do this is below. To create a PDF of it, run the
pdflatex utility on it.\documentclass{article}
\usepackage{multicol} % need this for manual column break
\usepackage[top=0.5in, bottom=0.5in, left=0.5in, right=0.5in]{geometry} % narrow margins
\usepackage{mdwlist} % for itemize*
\renewcommand{\labelitemi}{} % no bullet for top-level list items
\renewcommand{\labelitemii}{$\cdotp$} % bullet for next level of list items
\begin{document}
\begin{multicols}{2}
\begin{itemize*}
\item Errands
\begin{itemize*}
\item groceries
\item deposit check
\end{itemize*}
\item Household
\begin{itemize*}
\item laundry
\end{itemize*}
% need \vfill at the bottom of each column; otherwise one will be stretched to be as long as the other.
\vfill
\columnbreak
\item Monday
\item Tuesday
\begin{itemize*}
\item 5:00pm happy hour
\end{itemize*}
\item Wednesday
\begin{itemize*}
\item 7:00pm erlang meetup
\end{itemize*}
\item Thursday
\begin{itemize*}
\item 7:30pm dinner w/ Will
\end{itemize*}
\item Friday
\item Saturday
\begin{itemize*}
\item 9:00am plant sale
\end{itemize*}
\item Sunday
\end{itemize*}
\vfill
\end{multicols}
\end{document}
Tuesday, April 19, 2011
Io language installation
Update: Ran across someone else who's working through the installation issues, including addons.
Reading Seven Languages in Seven Weeks. Io looks interesting, so I thought I'd install it. Turns out there's no Debian/Ubuntu package for it, so you just have to download the source and compile it.
The instructions in README.txt are pretty good, but they don't tell you that you need to have cmake and g++ installed. You'll also get a whole mess of warnings if you don't have a bunch of development libraries installed.
Here's my complete installation process. (I installed to /opt/io):
Then you can add
Reading Seven Languages in Seven Weeks. Io looks interesting, so I thought I'd install it. Turns out there's no Debian/Ubuntu package for it, so you just have to download the source and compile it.
The instructions in README.txt are pretty good, but they don't tell you that you need to have cmake and g++ installed. You'll also get a whole mess of warnings if you don't have a bunch of development libraries installed.
Here's my complete installation process. (I installed to /opt/io):
# Install all the packages you're going to need
sudo apt-get install cmake g++ libssl-dev libgmp3-dev libffi-dev libncurses-dev libfreetype6-dev libglfw-dev libpng12-dev libtiff-dev libjpeg-dev libpcre3-dev libxml2 libxml2-dev
# Create the directory you're installing it to
sudo mkdir -p /opt/io
unzip stevedekorte-io-2010.06.06-329-gf641230.zip
cd stevedekorte-io-f641230/
mkdir build && cd build
time cmake -DCMAKE_INSTALL_PREFIX=/opt/io ..
time sudo make install
# Add the lib directory to your linker (ld) config
echo "/opt/io/lib/" | sudo tee /etc/ld.so.conf.d/Io.conf
sudo ldconfig
Then you can add
/opt/io/bin to you path, or just invoke /opt/io/bin/io directly.
Monday, April 11, 2011
Groovy script v class
Apparently, a groovy file is either a script or a class file, not both (contrary to this example). If you try to do something like:
you'll get an error like:
Further explanation here and here.
class Foo {
def bar
}
def baz = new Foo()
you'll get an error like:
Invalid duplicate class definition of class Foo
Further explanation here and here.
Wednesday, April 6, 2011
Set "Thip, crinkle, spoit" to OFF
It's a Dilbert reference.
Here's something that tends to bite me on the ass if I haven't started a new Maven project recently: Maven defaults to Java 1.3. Like, even if my
On a related note, it seems that the Groovy-Eclipse plugin doesn't add JUnit to the classpath for Groovy projects. So you need to paste
into your
Here's something that tends to bite me on the ass if I haven't started a new Maven project recently: Maven defaults to Java 1.3. Like, even if my
/usr/bin/java is 1.6, Maven still horks if my code isn't compatible with 1.3, which it usually isn't because of generics. So I end up having to track down this snippet and paste it into my pom.xml:<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
On a related note, it seems that the Groovy-Eclipse plugin doesn't add JUnit to the classpath for Groovy projects. So you need to paste
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
into your
.classpath file and restart Eclipse.
Subscribe to:
Posts (Atom)
Jekyll Pages List
Getting a list of pages in a Jekyll site is easy, but paring that down to just the top-level files and the index pages is tricky. {% for p...
-
Wireshark is a GUI tool, so it runs as your normal user, but it needs to be able to capture packets, which is normally a superuser thing. Th...
-
The problem: In Eclipse on my Windows machine at work, I get an error attempting to open Javascript files, and have to open them as plain te...
-
Installing an app you've developed on an actual Android device is documented pretty well , but I tripped over a missing step (c) for Lin...