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 ...
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
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.
I've tried to start the rails server with this line:
$ rails s
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
...
create log/test.log
But if I write down this:
$ script/rails s
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:138: warning: Insecure world writable dir /usr/lib/ruby/gems/1.8 in PATH, mode 040777
=> Booting WEBrick
=> Rails 3.0.1 application starting in development on http://0.0.0.0:3000
...
Anyone can see the problem? I think is a problem with environment variables, but I don't know how to fix it.
Thanks
I just came across this problem. I was switching from a Windows environment to Linux. My Linux version of rails is 2.3.14 while my Windows version was 3.0.1. On Windows "rails s" or "rails server" worked as expected to start a server, but on Linux it just created new projects with the names "s" and "Server" respectively. What finally explained it is the answer to the question below. Apparently the command behavior was changed between rails versions.
rails script/server doesn't start the server
The best solution is probably to update to the latest rails.
I was able to do that on my linux box by following the instructions below and using "sudo gem install rails"
http://installfest.railsbridge.org/installfest/ubuntu
http://root2linux.com/2011/01/install-rails-3-on-linux-mint-10/
this issue come from the different version in rvm, I faced this issue when my app was created using rvm 1.9.2 and I tried to run the server while rvm 1.9.3 was the running rvm version, simply switch to rvm1.9.2 and all will work properly (rvm use 1.9.2) in the terminal in ubunutu
Are you in a rails application directory? When you're running rails s make sure you've cd'd into the correct Rails directory. Common problem :)
I have an old laptop which runs OSX 10.4 Tiger where I'd like to run git, rvm, Ruby 1.9.2 and Rails 3.1.
At the moment I have git installed (using MacPorts), but rvm seems to require a newer version of bash. This I realized because the install script complains and I googled the error. Anyhow, I installed a newer bash with MacPorts and that helped me with getting rvm installed. However, it of course didn't replace the default bash version on the system and all rvm scripts point to the system one. This simply results in failures when I try to run any rvm commands.
Before I totally mess up the system I'd like to know does anyone have git, rvm, Ruby 1.9.2 and Rails 3.1 installed on OSX 10.4 Tiger? How did you install each part and what versions do you use?
Thanks for all help!
I never got this to work, but I decided to upgrade to OSX Snow Leopard. After this it was very easy to get things set up. This is what I recommend.
I'm newbie at ruby, I spent couple hours trying to find the way to install the plugin... but without any success, so here I am, very frustrated... please help.
OS: W7
ruby: ruby 1.9.2
rails: 3.0.5
msysgit: 1.7.4 (i did not any changes, just installation)
(is there anything else I should of mentioned?)
ruby script/plugin install git://github.com/thoughtbot/paperclip.git/
C:\Ruby\Ruby192\bin\ruby.exe: Permission denied -- script/plugin (LoadError)
Thank you!
The script/plugin command (and all other script/<exec> commands) is no longer used in Rails 3, instead you should do:
rails plugin install git://github.com/thoughtbot/paperclip.git