Digital Notepad

Internet, Mobility and Serious Geekery

WLAN on MSI Wind/Akoya and Ubuntu 9.04 “Jaunty Jackalope”

April29

Just a short notice for Ubuntu wannabe’s: I had trouble connecting to a FON router in our office.

After switching it to Authentication: “WPA2″ and Cipher: “AES” instead of “Mixed” Ubuntu 9.04 on my MSI Wind connected like a charm – right out of the box, now new WLAN-card necessary.

posted under Tech | 1 Comment »

Endlich – Filme im deutschen Apple iTunes Store

April16

Gerade zufällig im iTunes-Store gestöbert und gleich Wall-E angeboten bekommen. Endlich auch Filme im deutschen Store kaufen, ohne den bisherigen Umweg über den US-Store. Und leihen geht auch!

Kolleschen! Warm anziehen!

posted under Media, Tech | No Comments »

Recent rake tasks

March20

rake db:abort_if_pending_migrations
Raises an error if there are pending migrations

rake db:charset
Retrieves the charset for the current environment’s database

rake db:collation
Retrieves the collation for the current environment’s database

rake db:create
Create the database defined in config/database.yml for the current RAILS_ENV

rake db:create:all
Create all the local databases defined in config/database.yml

rake db:drop
Drops the database for the current RAILS_ENV

rake db:drop:all
Drops all the local databases defined in config/database.yml

rake db:fixtures:identify
Search for a fixture given a LABEL or ID. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures.

rake db:fixtures:load
Load fixtures into the current environment’s database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures.

rake db:migrate
Migrate the database through scripts in db/migrate and update db/schema.rb by invoking db:schema:dump. Target specific version with VERSION=x. Turn off output with VERBOSE=false.

rake db:migrate:down
Runs the “down” for a given migration VERSION.

rake db:migrate:redo
Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x. Target specific version with VERSION=x.

rake db:migrate:reset
Resets your database using your migrations for the current environment

rake db:migrate:up
Runs the “up” for a given migration VERSION.

rake db:reset
Drops and recreates the database from db/schema.rb for the current environment.

rake db:rollback
Rolls the schema back to the previous version. Specify the number of steps with STEP=n

rake db:schema:dump
Create a db/schema.rb file that can be portably used against any DB supported by AR

rake db:schema:load
Load a schema.rb file into the database

rake db:sessions:clear
Clear the sessions table

rake db:sessions:create
Creates a sessions migration for use with ActiveRecord::SessionStore

rake db:structure:dump
Dump the database structure to a SQL file

rake db:test:clone
Recreate the test database from the current environment’s database schema

rake db:test:clone_structure
Recreate the test databases from the development structure

rake db:test:load
Recreate the test database from the current schema.rb

rake db:test:prepare
Check for pending migrations and load the test schema

rake db:test:purge
Empty the test database

rake db:version
Retrieves the current schema version number

rake doc:app
Build the RDOC HTML Files

rake doc:clobber_app
Remove rdoc products

rake doc:clobber_plugins
Remove plugin documentation

rake doc:clobber_rails
Remove rdoc products

rake doc:guides
Generate Rails guides

rake doc:plugins
Generate documentation for all installed plugins

rake doc:rails
Build the RDOC HTML Files

rake doc:reapp
Force a rebuild of the RDOC files

rake doc:rerails
Force a rebuild of the RDOC files

rake gems
List the gems that this rails application depends on

rake gems:build
Build any native extensions for unpacked gems

rake gems:install
Installs all required gems.

rake gems:refresh_specs
Regenerate gem specifications in correct format.

rake gems:unpack
Unpacks all required gems into vendor/gems.

rake gems:unpack:dependencies
Unpacks all required gems and their dependencies into vendor/gems.

rake log:clear
Truncates all *.log files in log/ to zero bytes

rake middleware
Prints out your Rack middleware stack

rake notes
Enumerate all annotations

rake notes:custom
Enumerate a custom annotation, specify with ANNOTATION=WTFHAX

rake notes:fixme
Enumerate all FIXME annotations

rake notes:optimize
Enumerate all OPTIMIZE annotations

rake notes:todo
Enumerate all TODO annotations

rake rails:freeze:edge
Lock to latest Edge Rails, for a specific release use RELEASE=1.2.0

rake rails:freeze:gems
Lock this application to the current gems (by unpacking them into vendor/rails)

rake rails:template
Applies the template supplied by LOCATION=/path/to/template

rake rails:unfreeze
Unlock this application from freeze of gems or edge and return to a fluid use of system gems

rake rails:update
Update both configs, scripts and public/javascripts from Rails

rake rails:update:application_controller
Rename application.rb to application_controller.rb

rake rails:update:configs
Update config/boot.rb from your current rails install

rake rails:update:generate_dispatchers
Generate dispatcher files in RAILS_ROOT/public

rake rails:update:javascripts
Update your javascripts from your current rails install

rake rails:update:scripts
Add new scripts to the application script/ directory

rake routes
Print out all defined routes in match order, with names.

rake secret
Generate a crytographically secure secret key. This is typically used to generate a secret for cookie sessions.

rake spec
Run all specs in spec directory (excluding plugin specs)

rake spec:clobber_rcov
Remove rcov products for rcov

rake spec:controllers
Run the code examples in spec/controllers

rake spec:db:fixtures:load
Load fixtures (from spec/fixtures) into the current environment’s database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z.

rake spec:doc
Print Specdoc for all specs (excluding plugin specs)

rake spec:helpers
Run the code examples in spec/helpers

rake spec:lib
Run the code examples in spec/lib

rake spec:models
Run the code examples in spec/models

rake spec:plugin_doc
Print Specdoc for all plugin examples

rake spec:plugins
Run the code examples in vendor/plugins (except RSpec’s own)

rake spec:plugins:rspec_on_rails
Runs the examples for rspec_on_rails

rake spec:rcov
Run all specs in spec directory with RCov (excluding plugin specs)

rake spec:server:restart
restart spec_server.

rake spec:server:start
start spec_server.

rake spec:server:status
check if spec server is running

rake spec:server:stop
stop spec_server.

rake spec:views
Run the code examples in spec/views

rake stats
Report code statistics (KLOCs, etc) from the application

rake test
Run all unit, functional and integration tests

rake test:benchmark
Run tests for benchmarkdb:test:prepare / Benchmark the performance tests

rake test:functionals
Run tests for functionalsdb:test:prepare / Run the functional tests in test/functional

rake test:integration
Run tests for integrationdb:test:prepare / Run the integration tests in test/integration

rake test:plugins
Run tests for pluginsenvironment / Run the plugin tests in vendor/plugins/*/**/test (or specify with PLUGIN=name)

rake test:profile
Run tests for profiledb:test:prepare / Profile the performance tests

rake test:recent
Run tests for recentdb:test:prepare / Test recent changes

rake test:uncommitted
Run tests for uncommitteddb:test:prepare / Test changes since last checkin (only Subversion and Git)

rake test:units
Run tests for unitsdb:test:prepare / Run the unit tests in test/unit

rake time:zones:all
Displays names of all time zones recognized by the Rails TimeZone class, grouped by offset. Results can be filtered with optional OFFSET parameter, e.g., OFFSET=-6

rake time:zones:local
Displays names of time zones recognized by the Rails TimeZone class with the same offset as the system local time

rake time:zones:us
Displays names of US time zones recognized by the Rails TimeZone class, grouped by offset. Results can be filtered with optional OFFSET parameter, e.g., OFFSET=-6

rake tmp:cache:clear
Clears all files and directories in tmp/cache

rake tmp:clear
Clear session, cache, and socket files from tmp/

rake tmp:create
Creates tmp directories for sessions, cache, sockets, and pids

rake tmp:pids:clear
Clears all files in tmp/pids

rake tmp:sessions:clear
Clears all files in tmp/sessions

rake tmp:sockets:clear
Clears all files in tmp/sockets

posted under Tech | 1 Comment »

Quick checklist to railsify Ubuntu Desktop the kosher way

February23

Just a short rundown on how to use Ubuntu 8.1 Desktop as the main development machine.

  1. apt-get autoremove
  2. Click ‘install VMware Tools’ in menu.
  3. Copy Tools in personal working directory and tar xvfz.
  4. Enter directory and start sudo ./vmware-install.pl
  5. sudo apt-get install build-essential zlib1g-dev libssl-dev libpq-dev apache2-mpm-prefork apache2-prefork-dev libreadline5-dev git-core pgadmin3 postgresql
  6. wget the latest ruby: http://www.rubyenterpriseedition.com/download.html
  7. sudo ln -s /opt/ruby-enterprise-1.8.6-20090201/ /opt/ruby-enterprise
  8. sudo ln -s /opt/ruby-enterprise/bin/gem /usr/bin/gem
  9. sudo ln -s /opt/ruby-enterprise/bin/ruby /usr/bin/ruby
  10. sudo ln -s /opt/ruby-enterprise/bin/rake /usr/bin/rake
  11. sudo ln -s /opt/ruby-enterprise/bin/irb /usr/bin/irb
  12. sudo ln -s /opt/ruby-enterprise/bin/rails /usr/bin/rails
  13. sudo /opt/ruby-enterprise-1.8.6-20090201/bin/passenger-install-apache2-module
  14. And now follow this post: Mac OS X – ideal development platform – VMware, Ruby on Rails & Ubuntu
posted under Tech | No Comments »

GeoKit on Rails – excellent plugin with a twist

February6

Just a quicky, with the release of 1.2.1 of the geokit rails plugin there seems to be a regression, concerning the mappable.rb / acts_as_mappable mixin.

Putting this up front in my model helped a lot to avoid NameError: undefined local variable or method `acts_as_mappable’ :

require ‘vendor/plugins/geokit-rails/init.rb’

Maybe it’s just me, but at least now it works. I’ll ask Andre Lewis about this.

Update: Andre just twittered me that adding config.gem “andre-geokit”, :lib=>’geokit’, :source => ‘http://gems.github.com’ to /config/environment.rb does the trick as well. On to remove cruft from models!

posted under Tech | 1 Comment »
« Older EntriesNewer Entries »