I have installed ruby 1.9.3p194. I have also installed rails 3.2.8,3.2.6,and 3.0.3. I am able to create a new site using rails versions 3.2.8 and 3.0.3. When I try to create a site with rails 3.2.6 it rails to work.
rails _3.2.6_ new example
/Users/Dave/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:317:in `bin_path': can't find gem rails (["3.2.6"]) with executable rails (Gem::GemNotFoundException)
from /Users/Dave/.rvm/gems/ruby-1.9.3-p194/bin/rails:19:in `<main>'
from /Users/Dave/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/Dave/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
I have tried uninstalling 3.2.6 and reinstalling but the result is the same. Any help would on this would be great.
UPDATE: I was able to solve this problem by uninstalling both 3.2.6 and 3.0.3 and then reinstalling 3.2.6. Not sure why this worked but it does. At some point I need to install 3.0.3 can these versions not co-exist?
After spending some time looking at gemsets that was definitely the solution to this problem. I set up RVM and installed two versions of Ruby. Then I setup gemsets for each version that had the version of rails I needed to write code for the book I was working through and the web server I am using.
Related
I'm having a bit of a problem upgrading Ruby to 2.0.0 and Rails to 3.2.13. I was using this guide, and got to the step to create a new project specific gem list for ruby 2.0.0 and rails 3.2.13.
here's the code
and the files:
/usr/local/rvm/log/ruby-2.0.0-p0/yaml/configure.log:
http://txtup.co/f7taC
/usr/local/rvm/log/ruby-2.0.0-p0/openssl/configure.log:
http://txtup.co/vmXHM
/usr/local/rvm/log/ruby-2.0.0-p0/yaml/make.log:
http://txtup.co/wIowb
/usr/local/rvm/log/ruby-2.0.0-p0/openssl/make.log:
This is massive. I'll upload it if you ask me to
/usr/local/rvm/log/ruby-2.0.0-p0/configure.log:
http://txtup.co/zbNiz
If there's anything else you need, let me know. Not sure what I've done, but not really sure what to do next. Thanks!
try:
rvm get head
rvm install 2.0.0 --autolibs=4
I have a rails application running rails 3.0.20 and ruby 1.8.7
i want to upgrade to 1.9.3.
the stages i toke in order to start the process are so:
rvm user ruby-1.9.3
rvm gemset create upgradegems
rvm use ruby-1.9.3#upgradegems
now... i ran bundle. and i have a conflict with the twitter gem and the omniauth gem
so i updated them both.
then ran bundle again and it succeeded
now what?..
i tried running
rails s
and i got this error:
ruby-1.9.3-p194#amazonto/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing_from_s3_library': uninitialized constant Gattica::Auth::VERSION (NameError)
what am i doing wrong? and how do i fix?
thanks
Its not really your code, but its the library you are using Gattica, it wasn't updated for three years, try to put this on your Gemfile
gem "gattica", :git => "https://github.com/chrisle/gattica.git"
That's a fork that works great with ruby 1.9.x
I recently upgraded to ruby 1.8.7. i'm running Rails 2.3.5 and rubyGems 1.5.2.
ever since I upgraded, every time I want to start the server, i get:
undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x1022cc1c8> (NameError)
this post here advises to downgrade rugyGems to a version below 1.5.0.
downgrading doesn't seem to be the right solution..should I maybe be upgrading Ruby or Rails instead?
Also, if I upgrade to the latest ruby (1.9.2) and rails (3.0)..will my application break?
I have a very large application and can't figure out how to upgrade it without breaking the application..
That thing about version_requirements is a bug in rubygems - confirmed by their creators.
I've also participated in the bug report on the rubygems :)
gem update --system 1.5.0
performs a graceful downgrade until this is fixed.
I ran into this issue with some Rails 2.x applications and once also with 3.0.4 application, but with different error message, again, downgrading rubygems solved it.
You should use RVM so you can have both, 1.8 and 1.9.2 Ruby versions, running and you can be working with rails 2.3.x and rails 3.x the way that you want
i am just starting with RoR and working through some tutorials, there is however a particular piece of code on github that i would like to look at, i have cloned it to my local and cd into the project but 'rails s' does not seem to start the server - any ideas what i need to do?
That's a Rails 2.3.2 app. rails s was introduced in Rails 3, so you'll have to use the older script/server start command.
Also, you're going to need rails 2.3.2, which you can install with gem install -v=2.3.2 rails. There's also the possibility that you're missing some required gems, which you'll find out about by running the app and watching for load errors.
Also, make sure you're running Ruby 1.8.7, not Ruby 1.9.2. Rails 2.3.2 does not work with Ruby 1.9.2
I've got Snow Leopard with Rails 2.3.5 installed along with other versions (2.2.2 and 1.2.6). I'd like to use 2.2.2 as the webserver I want to deploy to uses a 2.2.x version of Rails. I've tried to uninstall Rails 2.3.5 but get this error:
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d rails`
Is there any other way of setting the Rails version to one of the other installed Rails versions?
You should really take look to RVM(Ruby Version Manager) it's awesome!
https://rvm.io
http://teachmetocode.com/screencasts/rvm-ruby-version-manager/
Cheers
Denis
You should be able to do this without needing to uninstall anything. You can specify the version of rails you want to create an application for by typing the following when creating a new app.
rails _2.2.2_ app_name