rails app won't run on new machine - rvm, bundler
I am trying to set up a new development machi开发者_如何学运维ne. We have a rails 3.0.3 app, using (obviously) bundler and rvm. We are sharing the .rvmrc through git. it is:
rvm ree@tgr_r3
Here is the strange behaviour:
rvm gemset delete tgr_r3 (make sure the gemset is gone)
cd ..
cd tgr2/
gem install bundler
bundle install --without production
rails c
At this point it is working - I can select do things like User.last and get items from our dev database.
But... If I do this:
cd ..
cd tgr2/
rails c
I now get:
/Users/psmy/.rvm/gems/ree-1.8.7-2011.03@tgr_r3/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03
Abort trap
What is going on here? I've tried this both with and without the Gemfile.lock from our git repo. Same result. I have other Rails 3 apps (and Rails 2 apps) on this machine that are working.
I have found a solution to this. If I first do
rvm use ree --default
then the above process is fine. I think there was no default ruby for rvm and that was screwing up the compilation of native stuff. Or something. All I know is that it works now.
精彩评论