Created
October 11, 2011 14:30
-
-
Save lenny/1278231 to your computer and use it in GitHub Desktop.
script/tomcat-console to run Rails console from a WAR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env jruby | |
raise "Must specify CATALINA_HOME" unless ENV['CATALINA_HOME'] | |
ENV['GEM_HOME'] ||= File.expand_path('../../gems', __FILE__) | |
require File.expand_path('../../../META-INF/init', __FILE__) | |
# expected by rails/commands | |
APP_PATH = File.expand_path('../../config/application', __FILE__) | |
require 'java' | |
Dir[File.expand_path('../../lib/*.jar', __FILE__)].each {|f| require f} | |
$CLASSPATH << File.expand_path('../../classes/', __FILE__) | |
$CLASSPATH << "#{ENV['CATALINA_HOME']}/lib/" | |
require File.expand_path('../../config/environment', __FILE__) | |
ARGV.unshift('c') | |
require 'rails/commands' | |
~ | |
~ | |
~ | |
~ | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment