Background
On my local machine, I tried installing the 'bullet' gem via my gemfile, and bundle seemed to go without incident, however upon restarting my app passenger began throwing the error Invalid gemspec for uniform_notifier. It seems someone else had this issue and the suggested resolution on StackOverflow said to update RubyGems by running:
The issue
gem update --system
This produced no error messages upon running, however now none of apps will start. They all give the same vague Passenger error:
PhusionPassenger::UnknownError
There was an error in your Gemfile, and Bundler cannot continue. (Bundler::GemfileError)
I removed 'bullet' from my gemfile so it's now back in a state when it was working yesterday, so I don't think there can be an error in my gemfile. Furthermore, all of my other apps are now broken and their gemfiles haven't changed at all.
For reference:
ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.5.0]
rails -v
Rails 3.2.6
rvm --version
rvm 1.1.4 by Wayne E. Seguin
And when I do gem list for the global and local gemsets, it shows bundler 1.1.0 installed.
Edit: I should also mention that running rails s starts up a WEBrick server just fine and I can access my apps at localhost:3000, so it's only under Passenger that this error crops up.
Have you committed your Gemfile.lock?
I was able to fix this by rolling back rubygems-update to the previously installed version by running
gem update --system 1.8.11
At which point all of my apps began working again. I'm still not sure what the problem was, and will gladly switch the accepted answer from my own to someone who can provide more insight into why updating rubygems-update would break Passenger integration.
I wish someone from Phusion Passenger would give a definitive answer but just wanted to say that I've experienced the same thing. Updating rubygems has broken passenger-nginx integration for us and requires recompiling the passenger-nginx module. Not sure why this would be. My speculation is that the module is somehow compiled with a hard reference to a specific version of rubygems.
Related
Ubuntu 20.04
Rails 3.2.22.5
Ruby 2.3.7
mysql2 8.0.29
Above are the versions that currently i'm using for my project(app).
In Gemfile mysql2 version is 0.3.18 but this version throwing me errors and not allowing me to run complete bundle.
But, when i'm trying to run bundle with different version of mysql2 gem like 0.5.4, bundle successfully running but after that when i try to create db(database) or to start server this above error mentioned in question appears.
Anyone please help me out in this regard if you guys have any idea about that.
Thanks in advance
I have a rails 3.2.8 site that was configured to use Postgres.App. The gem it was using was pg (0.12.2) It was working fine. I wanted to build another app and so set everything up as with the other app but I was getting this error:
/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.17.1/lib/pg.rb:4:in `require': dlopen(/Users/********/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.17.1/lib/pg_ext.bundle, 9): Library not loaded: #executable_path/../lib/libssl.1.0.0.dylib (LoadError) Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/libpq.dylib Reason: image not found - /Users/***********/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.17.1/lib/pg_ext.bundle
The gem in use here was pg (0.17.1) and I thought the discrepancy might be causing the problem so I uninstalled and reinstalled the gems. Now neither of them work and I get the same error message for both apps.
The Postgres.App version is 9.2.4.1
The solution that worked was to upgrade Postgres.App to the latest version, which I did by simply downloading the newest version and saving it over the top of the old one. Apparently there were some bugs in the earlier version. It now works fine for me.
I have a rails application that I am trying to deploy onto the internet. I have setup a server on the Amazon EC2 cloud, that I know works because I have deployed another site to the same machine.
When I try to run this new application either through 'rails console' or when running 'rake db:seed' or just by trying to browse to the application, rails crashes saying it cannot find activiesupport:
/home/ec2-user/.gem/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/core_ext/big_decimal/conversions.rb:1:in `require': cannot load such file -- bigdecimal (LoadError)
My Rails version is 3.2.2 and I'm using ruby 1.9.3p0 (2011-10-30) [x86_64-linux]. My database is MongoDB which I access through Mongoid. And I'm using Passenger and Apache as a server.
Is there any configuration step or something like that that I have missed?
P.S. I know I shouldn't be using ec2-user, I'm still experimenting. And also, I've never had much luck with RVM.
I encountered the same problem with Rails 3.2.3 and Ruby 1.9.3p0 on my Amazon EC2 instance, where Ruby had been installed with the ruby19 yum package. In my case, the problem seemed to be that I had installed the bigdecimal gem manually using the gem command instead of using Bundler. To fix the problem, I uninstalled the gem manually, added the line
gem 'bigdecimal'
to my application's Gemfile, and re-ran bundle install. This reinstalled the gem and then my application was able to load it successfully.
My gems are also installed in ~/.gem/ruby/1.9.1/, even though I am running Ruby 1.9.3p0. This does not appear to be a problem.
I have a rails application which is running well in local (OsX, WEBrick).
I've cloned the repo on a server (Ubuntu 10.04, Apache, Passenger), setted up passenger, but now when i try to connect to every page i get
Less::ParseError in Pages#home
Showing /var/www/MYAPP/app/views/layouts/application.html.erb where line #5 raised:
Cannot call method 'charAt' of undefined
(in /usr/lib/ruby/gems/1.8/gems/twitter-bootstrap-rails-2.0.2/vendor/assets/stylesheets/twitter/bootstrap.css.less)
the content of bootstrap.css.less is:
#import "twitter/bootstrap/bootstrap";
line 5 of application.html.erb is:
<%= stylesheet_link_tag "application" %>
ruby 1.8.7 on both machines
solved upgrading to ruby 1.9.3
Upgrading less worked for me on Ubuntu server 10.04
For system wide:
sudo npm -g install less
For user only:
npm install less
I believe this has something to do with the Ruby less gem not compiling it correctly. I had this problem locally on mac as well. Somewhere I saw a suggestion to use the node version of less (1.3) instead of the ruby gem, which you can install with npm install less.
However, most of the gems that hook up bootstrap to rails use the ruby gem version, so it seemed like a no go, esp on heroku etc. After a very frustrating couple of days on this I gave up and switch to the sass version of bootstrap: https://github.com/thomas-mcdonald/bootstrap-sass
It was simpler to integrate with rails, but unfortunate to be off the official version of bootstrap. I later went to integrate bootswatch but this doesn't play well with sass either. So I'm back to the plain old css version of bootswatch for now until a better way to handle this comes out :/
I had started the Rails app yesterday and got everything working.
Then today I decided to go with RVM, as I realized I might have need of it. So I uninstalled all gems, installed RVM and have now a working(?) RVM.
I reinstalled the gems and now my bundle exec rails server crashes
$ bundle exec rails server
[BUG] cross-thread violation on rb_gc()
(null)
Abort trap: 6
Crashreport
I have no idea whats wrong with my installation, as there is no reasonable error' which I could understand. :(
Edit: Gemfile
Try adding gcc-4.2 as your default C compiler to your bash profile:
export CC=/usr/bin/gcc-4.2
Then reinstall your rubies. You need XCode 4.1 to be installed before 4.2, otherwise you won't have gcc-4.2. The easiest way is to uninstall 4.2, and then install 4.1, then upgrade to 4.2.
Check out this solution: Error: cross-thread violation on rb_gc()
It looks like this might be an issue with a ruby version difference between your system and RVM. There are a few other articles out there on how to clean this up, like the one below, but I'm not sure which one will work for you:
http://blog.ubrio.us/nix/osx-rubygems-and-cross-thread-violations-in-rb_gc/
Great, the answer was to use ruby 1.9.3 instead of 1.9.2 ...