Skip to content

Instantly share code, notes, and snippets.

[aurelian@7of9 ~]$ file -b `which ruby`
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
[aurelian@7of9 ~]$ uname -a
Linux --- 2.6.24.7-grsec-nopax-200805121951.7 #1 SMP Sat Jun 7 21:15:45 MDT 2008 i686 i686 i386 GNU/Linux
[locknet@web4 ~]$ file -b `which ruby`
ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped
oryol /tmp/rs $ script/console
Loading development environment (Rails 2.3.4)
Missing these required gems:
ruby-stemmer = 0.6.2
You're running:
ruby 1.8.7.174 at /Users/aurelian/.rvm/ruby-1.8.7-p174/bin/ruby
rubygems 1.3.5 at /Users/aurelian/.rvm/gems/ruby/1.8.7
Run `rake gems:install` to install the missing gems.
oryol /Projects/Open/ruby-stemmer(master) $ arch
i386
oryol /Projects/Open/ruby-stemmer(master) $ file `which ruby`
/Users/aurelian/.rvm/ruby-1.8.7-p174/bin/ruby: Mach-O 64-bit executable x86_64
oryol /Projects/Open/ruby-stemmer(master) $ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0]
==== Without arch flag
actionmailer (2.3.4, 2.3.2)
actionpack (2.3.4, 2.3.2)
activerecord (2.3.4, 2.3.2)
activeresource (2.3.4, 2.3.2)
activesupport (2.3.4, 2.3.2)
arrayfields (4.7.4)
aurelian-contacts (0.3.3, 0.3.2)
braid (0.5)
cgi_multipart_eof_fix (2.5.0)
commonthread-flickr_fu (0.3.0)
# match all for subdomains
<VirtualHost *>
ServerName example.com
ServerAlias *.example.com
RedirectMatch permanent (.+)$ http://example.com
</VirtualHost>
finques /tmp $ git clone git@github.com:aurelian/slobo.git
Initialized empty Git repository in /tmp/slobo/.git/
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.
finques /tmp $ cd slobo/
finques /tmp/slobo(master) $ git st
# On branch master
nothing to commit (working directory clean)
mysql> create table `tm` (
`id` int(11) auto_increment,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
primary key (`id`))
engine=InnoDB CHARACTER SET utf8 COLLATE utf8_unicode_ci default charset=utf8;
Query OK, 0 rows affected (0.36 sec)
mysql> insert into tm (`name`) values ('București');
Query OK, 1 row affected (0.05 sec)
mysql> create table `tm` ( `name` varchar(255), primary key (`name`)) engine=InnoDB default charset=utf8;
Query OK, 0 rows affected (1.18 sec)
mysql> insert into tm values ('București');
Query OK, 1 row affected (0.01 sec)
mysql> insert into tm values ('Bucuresti');
ERROR 1062 (23000): Duplicate entry 'Bucuresti' for key 1
mysql> delete from tm;
finques /Projects/spa $ rake db:migrate
(in /Projects/spa)
Missing the Rails 2.3.2 gem. Please `gem install -v=2.3.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
finques /Projects/spa $ head config/environment.rb
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
require 'rubygems'
require 'geo_ruby'
GeoRuby::Shp4r::ShpFile.open(ARGV[0]) do | shp |
puts "** #{shp.shp_type}"
shp.each do | record |
puts "** #{record.data.inspect}"
shp.fields.each do | field |
puts "** #{record.data[field.name].inspect}"
end