Skip to content

Commit

Permalink
Update references from RAIS_ROOT to Rails.root
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Jul 24, 2010
1 parent 87cc458 commit 142b0fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/webrat/core/save_and_open_page.rb
@@ -1,6 +1,6 @@
module Webrat
module SaveAndOpenPage
# Saves the page out to RAILS_ROOT/tmp/ and opens it in the default
# Saves the page out to Rails.root/tmp/ and opens it in the default
# web browser if on OS X. Useful for debugging.
#
# Example:
Expand Down
6 changes: 3 additions & 3 deletions lib/webrat/selenium/application_servers/rails.rb
Expand Up @@ -27,15 +27,15 @@ def fail
end

def pid_file
prepare_pid_file("#{RAILS_ROOT}/tmp/pids", "mongrel_selenium.pid")
prepare_pid_file("#{::Rails.root}/tmp/pids", "mongrel_selenium.pid")
end

def start_command
"mongrel_rails start -d --chdir='#{RAILS_ROOT}' --port=#{Webrat.configuration.application_port} --environment=#{Webrat.configuration.application_environment} --pid #{pid_file} &"
"mongrel_rails start -d --chdir='#{::Rails.root}' --port=#{Webrat.configuration.application_port} --environment=#{Webrat.configuration.application_environment} --pid #{pid_file} &"
end

def stop_command
"mongrel_rails stop -c #{RAILS_ROOT} --pid #{pid_file}"
"mongrel_rails stop -c #{::Rails.root} --pid #{pid_file}"
end

end
Expand Down

1 comment on commit 142b0fb

@dam5s
Copy link

@dam5s dam5s commented on 142b0fb Oct 19, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if the command to launch the server would use "cd" to change directory before launching the server, this would hopefully allow the use of .rvmrc to load the proper rvm ruby+gemset.

Maybe there is a better solution though...

Please sign in to comment.