Permalink
Browse files

bin/ripl-rc: show error message if it can't find ripl-rails

  • Loading branch information...
1 parent 0e5d01c commit 3ddccb1819ec375c8e5cc613860cd7e1f91686b5 @godfat committed Mar 23, 2011
Showing with 12 additions and 3 deletions.
  1. +10 −1 bin/ripl-rc
  2. +2 −2 ripl-rc.gemspec
View
@@ -1,8 +1,17 @@
#!/usr/bin/env ruby
require 'ripl/rc'
+
if ARGV.size > 0
- load(`which #{Ripl::Runner.app}-#{ARGV.shift}`.chomp)
+ plugin = "#{Ripl::Runner.app}-#{ARGV.shift}"
+ path = `which #{plugin}`.strip
+ if path == ''
+ puts("Can't find `#{plugin}' in $PATH.\n" \
+ "Please make sure `#{plugin}' is installed.\n" \
+ "e.g. run `gem install #{plugin}`")
+ else
+ load(path)
+ end
else
Ripl.start
end
View
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Lin Jen-Shin (godfat)"]
- s.date = %q{2011-03-01}
+ s.date = %q{2011-03-23}
s.default_executable = %q{ripl-rc}
s.description = %q{ripl plugins collection, take you want, leave you don't.}
s.email = ["godfat (XD) godfat.org"]
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.homepage = %q{http://github.com/godfat/}
s.rdoc_options = ["--main", "README"]
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.5.3}
+ s.rubygems_version = %q{1.6.2}
s.summary = %q{ripl plugins collection, take you want, leave you don't.}
s.test_files = ["test/test_squeeze_history.rb"]

0 comments on commit 3ddccb1

Please sign in to comment.