I'm getting the same error every time I'm trying to install the rvmsudo passenger-install-nginx-module:
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'passenger' (>= 0) among 114 total gem(s) (Gem::LoadError)
from ~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from ~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from ~/.rvm/gems/ruby-2.0.0-p247#rails4/bin/passenger:22:in `<main>'
from ~/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
from ~/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
Sys. info:
OSX 10.0.4
ruby 2.0.0-p247
rails 4
passenger 4.0.20 (installed with rvmsudo)
P.S.
I already used rvmsudo, so just using this doesn't solve the problem as some other questions/answers could propose. I think the problem is in paths, but where?
Update:
I did the same without rvmsudo (install the passenger gem), but still running the (rvmsudo) passenger-install-nginx-module causes the error with missing gem passenger
Update2:
I installed homebrew and with its help installed passenger. Then installed passenger nginx module which didn't work:
Unable to start the Phusion Passenger watchdog because its executable (/usr/lib/phusion-passenger/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable.
Then I installed the passenger nginx module with rvmsudo passenger-install-nginx-module, so now it worked. I configured it for my rails app. But if I start nginx from /opt/nginx/sbin/nginx and navigate to the vhost to my rails application I get:
No data received
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
If I look to the /opt/nginx/log/error.log I get for that request:
libc++abi.dylib: terminate called throwing an exception
2013/10/21 15:15:30 [alert] 54636#0: worker process 54723 exited on signal 6
What could be here a problem, is it passenger? My rails app worked with WebRick well, and it runs on another server also good with passenger. Maybe it is already another question...
try
brew install nginx --with-passenger
Phusion Passenger author here. First of all, I apologize for the problems. We're doing our best to make the installation experience as problem-free as possible.
From the information you've provided, I'm not entirely sure what went wrong. I'd like to go over this with you, so that we automatically check for (and prevent) these kinds of problems in the future. If you have time today, could you join the IRC channel #passenger on irc.freenode.net? My time zone is Europe/Amsterdam.
Related
I did an install of Redmine on my OSX Lion Server following the install guide on the Redmine website. There it told me to update/install some RubyGems. The install of Redmine went fine but the procedure killed my Profile Manager and Wiki Service.
Looking around on the web led me to the Apple Support web page http://support.apple.com/kb/TS4042
Basically it says not to update or install Ruby Gems because it will cause problems but it does not give a solution if you already did update or install any Ruby Gem.
Is there a way to revert back to the default Ruby install on OSX Lion Server (10.7.3) without a complete reinstall of the system?
I'm looking for a solution for this same exact issue as well.
I'll post anything additional that I find.
So, in addition wikid/collabd not working, I was also seeing gobs of error messages in /var/log/system.log from sandboxd regarding ruby:
Apr 17 11:34:07 reddwarf sandboxd[3890] ([3887]): ruby(3887) deny
file-read-metadata /private/var/folders/zz/zyxvpxvq6csfxvn_n00000vm00006x
I found a thread in Apple Communities (https://discussions.apple.com/thread/3216408?start=0&tstart=0) that showed a possible solution:
Can you uninstall the newer version of Rack, 1.2.2?
sudo gem uninstall rack
sudo gem install rack --version 1.2.1
This is a bug we're aware of.
I decided to do this since I had originally got mired in this mess after updating ruby.
First off, stop the wiki server...
sh-3.2# serveradmin stop wiki
wiki:state = "STOPPED"
I found I had multiple versions of rack installed (1.4.1 and 1.3.5), but 1.2.1 did not show as installed, which evidently is the version of this gem that wikid depends on.
sh-3.2# gem uninstall rack
Select gem to uninstall:
1. rack-1.3.5
2. rack-1.4.1
3. All versions
> 2
I uninstalled both of these, trying to start the wiki server after each was removed. The wiki was still not working up to this point. Then I installed 1.2.1...
sh-3.2# gem install rack --version 1.2.1
Successfully installed rack-1.2.1
1 gem installed
Installing ri documentation for rack-1.2.1...
Installing RDoc documentation for rack-1.2.1...
After that, another attempt at starting the wiki...
sh-3.2# serveradmin start wiki
wiki:state = "STARTING"
sh-3.2# serveradmin status wiki
wiki:state = "RUNNING"
And guess what? It actually worked! My wiki is now functional again.
I'm running on Ubuntu. The question is so basic it feels silly but I have done some searching and can't figure out the answer.
Edit: I am running into similar issues as the following
Uninitialized constant using Twitter ruby gem
You don't need to restart Ruby after installing gems. You can for example
gem install rails
and after that you can start running rails (which uses Ruby) right away and no need to restart Ruby.
In Uninitialized constant using Twitter ruby gem link restart means ctr+c that is stop the server and rails s (for rails 3) that is start the server.
I am trying to setup an nginx + sinatra + ubuntu 10.04 + passenger + rvm stack. I followed the directions here: http://thekindofme.wordpress.com/2010/10/24/rails-3-on-ubuntu-10-10-with-rvm-passenger-and-nginx/
This is a follow up to this post: Sinatra Gem Won't Install. I also followed the directions given by another stack overflow that essential creates an .rvmrc in my app and I've added the passenger gem.
According to the previous post, I am spawning the wrong passenger.
In my nginx conf file I'm using: passenger_root /home/noahc/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9;
How do I find out which passenger I'm supposed to be spawning and how do I change it?
You can visit http://shiftfrog and see the stacktrace that generated this question and the previous one.
Any ideas? Am I doing this in the wrong order?
Should I setup RVM, then ruby, then follow the directions for setting up the gemset and rvmrc file in my project directory. Then run the rvmsudo passenger-install-nginx-module command from the gemset I created. Currently I ran it outside of the gemset I created according to the previous stackoverflow question I reference earlier.
Thank in advance for any help you could lend.
There is quite nice description on RVM site and Dercys blog:
https://rvm.io/integration/passenger/
http://blog.ninjahideout.com/posts/the-path-to-better-rvm-and-passenger-integration
Running Ubuntu 10, RVM, Passenger and apache2. Trying to configure and get Redmine running.
First, I set my default Ruby binary to /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby. That's the output of which ruby. Output of which gem is /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/gem. I think that side of things is set up properly.
I know Passenger is running, because I'm getting an error screen, with this error:
Error message:
Missing the i18n 0.4.2 gem. Please gem install -v=0.4.2 i18n
Update The error that passenger is producing is coming from the boot.rb file. I went and made a gist of the application's boot.rb file.
When I do check to see if that gem is installed, here's the output.
# gem list
# ... list truncated ...
# i18n (0.4.2)
(full gist of installed gems here)
Really? Let's first make sure passenger.conf is going to the right Ruby installation...
passenger.conf
PassengerRuby /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby
>:| So now, I go onto SSH into the application directory, and what have you, script/server starts normally. I'm a little more than confused. Clearly the Ruby installation that Passenger is configured to has the Gem it says is missing, installed, and additionally, the application doesn't falter on a start up. Which makes me think it's a Passenger problem.
Using RVM with Passenger is a bit complicated, maybe this link about using Ruby and Passenger will help.
I've installed the Passenger Preference Pane on OSX but whenever I try to run an app I get a 500 Internal Error. Looking at the log gives me the following error:
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/utils.rb:25:in `require': no such file to load -- rubygems (LoadError)
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/utils.rb:25
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/bin/passenger-spawn-server:53:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/bin/passenger-spawn-server:53
[ pid=403 file=ext/apache2/Hooks.cpp:725 time=2009-11-15 23:33:38.110 ]:
Unexpected error in mod_passenger: Cannot spawn application '/Users/waynemolina/Projects/sandbox/rack-hello-world': The spawn server has exited unexpectedly.
Backtrace:
in 'virtual boost::shared_ptr Passenger::ApplicationPoolServer::Client::get(const Passenger::PoolOptions&)' (ApplicationPoolServer.h:471)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:521)
Since rubygems works everywhere else, I can only assume this error is because Passenger is looking in the wrong place for Rubygems. I installed Rubygems manually and it's located in /usr/local/bin/gem according to which gem. However, whereis gem returns /usr/bin/gem instead. I'm more than a little confused on what steps I need to take to fix this short of just reinstalling OSX and upgrading the built-in RubyGems install instead of installing it myself.