Getting Failure/Error: Puppet::SSL::CertificateAuthority.new in puppet - ssl

I built the puppet from source code ,on a solo architecture with both puppet master and agent on the same node , when i run the rspec test cases , i am getting a lot of SSL certs issues , and almost all of the have same failure.
Puppet::Face[:ca, v0.1.0]
Failure/Error: Puppet::SSL::CertificateAuthority.new
Errno::EACCES:
Permission denied # rb_sysopen - /tmp/rspecrun20150617-23070-1ls4i9z/face-ca-ssldir20150617-23070-hwwl9f/ca/ca_key.pem
# ./lib/puppet/file_system/file_impl.rb:26:in `initialize'
# ./lib/puppet/file_system/file_impl.rb:26:in `open'
# ./lib/puppet/file_system/file_impl.rb:26:in `open'
# ./lib/puppet/file_system.rb:37:in `open'
# ./lib/puppet/settings/file_setting.rb:197:in `block in open'
# ./lib/puppet/settings/file_setting.rb:230:in `block (2 levels) in controlled_access'
# ./lib/puppet/util.rb:48:in `withumask'
# ./lib/puppet/settings/file_setting.rb:221:in `block in controlled_access'
# ./lib/puppet/util/suidmanager.rb:72:in `asuser'
# ./lib/puppet/settings/file_setting.rb:219:in `controlled_access'
# ./lib/puppet/settings/file_setting.rb:196:in `open'
# ./lib/puppet/indirector/ssl_file.rb:162:in `write'
# ./lib/puppet/indirector/ssl_file.rb:98:in `save'
# ./lib/puppet/indirector/indirection.rb:276:in `save'
# ./lib/puppet/ssl/host.rb:151:in `generate_key'
# ./lib/puppet/ssl/host.rb:197:in `certificate'
# ./lib/puppet/ssl/certificate_authority.rb:270:in `setup'
# ./lib/puppet/ssl/certificate_authority.rb:161:in `initialize'
# ./spec/integration/faces/ca_spec.rb:20:in `new'
# ./spec/integration/faces/ca_spec.rb:20:in `block (2 levels) in <top (required)>'

Related

Selenium::WebDriver::Error::UnknownError: unknown error: session deleted because of page crash on rails application tested on codeship

Using Codeship as an automatic test plateform I have this error that occur only on codeship automatic run, not on my local environment, nor if I run the same test on codeship via ssh debug console :
Selenium::WebDriver::Error::UnknownError:
unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
(Session info: headless chrome=98.0.4758.102)
(Driver info: chromedriver=98.0.4758.102 (273bf7ac8c909cde36982d27f66f3c70846a3718-refs/branch-heads/4758#{#1151}),platform=Linux 5.4.0-1065-aws x86_64)
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:81:in `new'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:81:in `create_response'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/default.rb:104:in `request'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/bridge.rb:164:in `execute'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/oss/bridge.rb:579:in `execute'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/oss/bridge.rb:50:in `get'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/common/navigation.rb:30:in `to'
# /home/rof/cache/bundler/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/selenium/driver.rb:71:in `visit'
# /home/rof/cache/bundler/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/session.rb:278:in `visit'
# /home/rof/cache/bundler/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/dsl.rb:53:in `call'
# /home/rof/cache/bundler/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/dsl.rb:53:in `visit'
# ./spec/features/authentications_spec.rb:17:in `block (2 levels) in <top (required)>'
# /home/rof/cache/bundler/ruby/2.7.0/gems/webmock-3.9.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
The headless configuration run is :
Capybara.register_driver :headless_chrome do |app|
client = Selenium::WebDriver::Remote::Http::Default.new
client.read_timeout = 120
options = ::Selenium::WebDriver::Chrome::Options.new()
options.add_argument 'headless'
options.add_argument('log-level=OFF')
options.add_argument('disable-dev-shm-usage') #The location of the shared memory file/dev/from shm/Move to tmp
options.add_argument('window-size=1024,768')
options.add_option('prefs', {'intl.accept_languages': 'en,en_US'})
options.add_option('w3c', false)
Capybara::Selenium::Driver.new app, browser: :chrome, options: options, http_client: client
end
Does someone have any clue on why it occurs? Or how I can find it out?

No Backtrace on request specs with Rspec

I have a request spec like this
require 'rails_helper'
describe 'People API' do
describe 'GET /api/v1/people/lookup.json?phone_number=PHONE_NUMBER', :wip do
it 'returns a 200 status code' do
auth_get '/api/v1/people/lookup.json', phone_number: '91900199'
expect(response.status).to eq(200)
end
end
end
and if the specs fail for some reason I just get a 500 status code in the response, and that's it, so I have to check the log/test.log file to get to know what went wrong, that is pretty annoying.
Why rspec is not showing the backtrace like in other types of specs?
Here is how I run my specs, notice that I include the -b option
$ rspec -b -t wip -f documentation
Run options: include {:wip=>true}
People API
GET /api/v1/people/lookup.json?phone_number=PHONE_NUMBER
returns a 200 status code
Failures:
1) People API GET /api/v1/people/lookup.json?phone_number=PHONE_NUMBER with an empty phone number returns a empty response
Failure/Error: expect(response.status).to eq(200)
expected: 200
got: 500
(compared using ==)
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-expectations-3.0.1/lib/rspec/expectations/fail_with.rb:30:in `fail_with'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-expectations-3.0.1/lib/rspec/expectations/handler.rb:35:in `handle_failure'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-expectations-3.0.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-expectations-3.0.1/lib/rspec/expectations/expectation_target.rb:54:in `to'
# ./spec/requests/api/v1/people_spec.rb:15:in `block (4 levels) in <top (required)>'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:148:in `instance_exec'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:148:in `block in run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:210:in `call'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:210:in `block (2 levels) in <class:Procsy>'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-rails-3.0.1/lib/rspec/rails/adapters.rb:68:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:294:in `instance_exec'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:294:in `instance_exec'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/hooks.rb:430:in `block (2 levels) in run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:210:in `call'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:210:in `block (2 levels) in <class:Procsy>'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/hooks.rb:432:in `run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/hooks.rb:485:in `run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:303:in `with_around_example_hooks'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example.rb:145:in `run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:494:in `block in run_examples'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:490:in `map'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:490:in `run_examples'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:457:in `run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:458:in `block in run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:458:in `map'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:458:in `run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:458:in `block in run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:458:in `map'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/example_group.rb:458:in `run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:112:in `block (2 levels) in run_specs'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:112:in `map'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:112:in `block in run_specs'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/reporter.rb:54:in `report'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:108:in `run_specs'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:86:in `run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:70:in `run'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:38:in `invoke'
# /Users/fespinoza/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.1/exe/rspec:4:in `<top (required)>'
# /Users/fespinoza/.rbenv/versions/2.1.1/bin/rspec:23:in `load'
# /Users/fespinoza/.rbenv/versions/2.1.1/bin/rspec:23:in `<main>'
Finished in 0.46863 seconds (files took 3.59 seconds to load)
1 examples, 1 failures
but it does not contain the real reason of the 500 error
Your request specs interact with your full stack, including middleware. When an error occurs inside one of your controller methods, it is caught higher up the stack so that a 500 error can be returned to the client. This is what you are seeing in the assertion failure.
You might be able to write your own middleware for testing purposes which prints errors to stderr if you really want this.

ActionController::RoutingError when js => true

None of my tests have an error, except the one I'm adding with js => true. Oddly enough the test would pass if not for a routing error.
My test:
context 'Javascript', :js => true do
visit careers_path
page.should have_content("Your Recommendations")
end
I can actual puts page.body and see that the content is there, but it still comes up with this routing error. I notice that while running the actual server and it comes up with a GET request for the assets folder. I don't understand why or what is doing this, but it seems to be the cause of failure.
The errors:
While running rails s
Started GET "/assets/" for 127.0.0.1 at 2013-08-12 19:11:02 -0400
Served asset / - 404 Not Found (5ms)
While running rspec
Failure/Error: Unable to find matching line from backtrace
ActionController::RoutingError:
No route matches [GET] "/assets"
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/actionpack-3.2.14/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/actionpack-3.2.14/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.14/lib/rails/rack/logger.rb:32:in `call_app'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.14/lib/rails/rack/logger.rb:16:in `block in call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.2.14/lib/active_support/tagged_logging.rb:22:in `tagged'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.14/lib/rails/rack/logger.rb:16:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/actionpack-3.2.14/lib/action_dispatch/middleware/request_id.rb:22:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.2.14/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/actionpack-3.2.14/lib/action_dispatch/middleware/static.rb:63:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.14/lib/rails/engine.rb:484:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.14/lib/rails/application.rb:231:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/rack-1.4.5/lib/rack/builder.rb:134:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in `block in call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `each'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/capybara-2.1.0/lib/capybara/server.rb:19:in `call'
# /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
# /Users/tom/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
# /Users/tom/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
# /Users/tom/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
On a side note, adding config.action_dispatch.show_exceptions = true to config/environments/test.rb allows the test to pass, it does not explain why it is happening, it merely suppresses the warning

Error compiling native support for Phusion Passenger

I'm trying to setup Phusion Passenger for Apache on a Ubuntu 12.04 LTS 64-bit server for a Rails 3.2.13 application.
I can run the Rails application perfectly fine using the Webrick server but whenever I run it under Apache I get a 500 Internal Server error and the Apache error log shows the following,
*** Phusion Passenger: no passenger_native_support.so found for the current Ruby interpreter. Compiling one...
# mkdir -p /buildout/ruby/ruby-1.9.3-x86_64-linux
# cd /buildout/ruby/ruby-1.9.3-x86_64-linux
*** Phusion Passenger: no passenger_native_support.so found for the current Ruby interpreter. Compiling one...
# mkdir -p /buildout/ruby/ruby-1.9.3-x86_64-linux
# cd /buildout/ruby/ruby-1.9.3-x86_64-linux
/var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:67:in `join': can't convert nil into String (TypeError)
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:67:in `extconf_rb'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:178:in `block (2 levels) in compile'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:176:in `chdir'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:176:in `block in compile'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:170:in `each'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:170:in `each_with_index'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:170:in `compile'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:140:in `compile_and_load'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:37:in `start'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:228:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/utils.rb:26:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:102:in `rescue in <main>'
from /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:30:in `<main>'
*** Phusion Passenger: no passenger_native_support.so found for the current Ruby interpreter. Compiling one...
# mkdir -p /buildout/ruby/ruby-1.9.3-x86_64-linux
# cd /buildout/ruby/ruby-1.9.3-x86_64-linux
*** Phusion Passenger: no passenger_native_support.so found for the current Ruby interpreter. Compiling one...
# mkdir -p /buildout/ruby/ruby-1.9.3-x86_64-linux
# cd /buildout/ruby/ruby-1.9.3-x86_64-linux
/var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:67:in `join': can't convert nil into String (TypeError)
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:67:in `extconf_rb'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:178:in `block (2 levels) in compile'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:176:in `chdir'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:176:in `block in compile'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:170:in `each'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:170:in `each_with_index'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:170:in `compile'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:140:in `compile_and_load'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:37:in `start'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/native_support.rb:228:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.9.1/gems/passenger-4.0.10/lib/phusion_passenger/utils.rb:26:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:102:in `rescue in <main>'
from /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:30:in `<main>'
[ pid=2036 thr=140218616461056 file=ext/apache2/Hooks.cpp:884 time=2013-08-05 12:42:29.716 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/cms/sandbox': Could not read from the spawn server: Connection reset by peer (104)
Backtrace:
(empty)
I've checked the line in the source code and its referring to a ruby_extension_source_dir. I presume its something wrong with my config somewhere but I've checked the paths for Passenger using the passenger-config tool and they are correct (the relevant Apache config is below),
<IfModule mod_passenger.c>
PassengerRoot /var/lib/gems/1.9.1/gems/passenger-4.0.10
PassengerRuby /usr/bin/ruby1.9.1
</IfModule>

Problems Deploying a rails app to Heroku

I am having problems deploying a Rails app to Heroku, I can't even run the Heroku console! (see below for the response I get from terminal)
I'm pretty new to rails and programming in general, so I don't really understand what the problem is here, would really appreciate some assistance!
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require': /app/config/environments/production.rb:3: unknown regexp options - lcal (SyntaxError)
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/application/bootstrap.rb:11:in `block in <module:Bootstrap>'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/initializable.rb:25:in `instance_exec'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/initializable.rb:25:in `run'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/initializable.rb:50:in `block in run_initializers'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/initializable.rb:49:in `each'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/initializable.rb:49:in `run_initializers'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/application.rb:134:in `initialize!'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/application.rb:77:in `method_missing'
from /app/config/environment.rb:7:in `<top (required)>'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/application.rb:103:in `require_environment!'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.8/lib/rails/commands.rb:22:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Here is config/environments./production.rb, I commented out line 3 as I thought that might be the issue, but I get the same problem whether it's commented, uncommented or deleted completely!
Pingpong::Application.configure do
# /opt/local/bin/convert
# Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
# See everything in the log (default is :info)
# config.log_level = :debug
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = false
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
# Enable threaded mode
# config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
end
/app/config/environment
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Pingpong::Application.initialize!
The problem is line 3. Make sure you have committed your changes and then push them to Heroku.