File: .pryrc

package info (click to toggle)
ruby-pg 1.5.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,264 kB
  • sloc: ansic: 8,820; ruby: 2,809; makefile: 10
file content (23 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/ruby -*- ruby -*-

BEGIN {
	require 'pathname'
	require 'rbconfig'

	basedir = Pathname.new( __FILE__ ).dirname.expand_path
	libdir = basedir + "lib"

	puts ">>> Adding #{libdir} to load path..."
	$LOAD_PATH.unshift( libdir.to_s )
}


# Try to require the 'pg' library
begin
	$stderr.puts "Loading pg..."
	require 'pg'
rescue => e
	$stderr.puts "Ack! pg library failed to load: #{e.message}\n\t" +
		e.backtrace.join( "\n\t" )
end