RailsInstaller not completing install on OS X 10.6, not responding - ruby-on-rails

I'm new to Ruby on Rails and to web development in general. Yesterday I successfully installed Git, osx-gcc-installer, RVM and Ruby on my Mac OS X 10.6. To try to get Rails and everything else I need, I downloaded RailsInstaller for OS X 10.6 and apparently made it at least through the unpacking of files, but now I have the RailsInstaller Setup window hanging on my machine for over two hours. It has a message "Completing the RailsInstaller setup wizard"... "Setup has finished installing Railsinstaller on your computer." Clicking on Finish, Back, anything does absolutely nothing; the window just sits there. Clearly something is not working, and I'm not sure what to do. I checked the Rails install in the terminal and got the following message:
$ rails --help
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:827:in report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:261:inactivate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:68:in `gem'
from /usr/bin/rails:18
I'm hesitant to start killing processes or restart my machine. Also wondering if I'm going to have to purge everything I've already installed and start over from scratch, and not sure how I would go about that.
Any thoughts would be appreciated. Thanks.

I had trouble running the installer as well. It was not exactly the same issues you had.
Running the installer from the terminal as root worked much better for me.
The command would look something like this:
sudo ./RailsInstaller-1.0.4-osx-10.7.app/Contents/MacOS/osx-intel --mode text
If that does not work, you can get additional debugging diagnostics with the --debuglevel flag.

Related

Reinstall Rails every time I restart my computer?

My issue concerns my inability to keep a working version of RoR on my mac OSX 10.6.8. I've been working through various books that teach Rails, but the biggest issue I keep running into is that the Rails installation seems to disappear whenever I restart my computer. I have a directory on my desktop, within which I put all of my Rails projects. Whenever I attempt to open that folder in terminal and create a new rails app,
rails new examplename
I get met with this error:
/Library/Ruby/Site/1.8/rubygems/dependency.rb:313:in `to_specs':
Could not find 'rails' (>= 0) among 12 total gem(s) (Gem::LoadError)
Checked in
'GEM_PATH=/Users/greyelerson/.rvm/gems/ruby-1.9.3-p547:/Users/greyelerson/.rvm/gems/ruby-1.9.3- p547#global', execute `gem env` for more information
from /Library/Ruby/Site/1.8/rubygems/dependency.rb:322:in `to_spec'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_gem.rb:58:in `gem'
from /usr/bin/rails:18
The only "solution" which has allowed me to continue thus far has been to completely reinstall ruby and then reinstall rails every time I want to work. There has got to be a real and permanent fix for this. Please help.
Rather than installing Rails into the system version of Ruby, I would recommend that you instead install your own copy of Ruby in your home directory using RVM. That way, your changes won't conflict with the system's changes. For example, if Apple decides to update Ruby to a new version that's incompatible with your version of Rails, you're still safe because you have your own version in your home directory. You can also install multiple versions of Ruby if you want to test your code with beta versions or whatever.

I need to start over with a fresh, ground zero, install of Rails. How do I do that?

Running Mac OS X Mavericks, I have completely jacked up my Rails installation to the point that I am unable to sort out what all is wrong. I'm working through the railsapps.org book on learning rails and am simply trying to set up the test environment so I can actually start learning... Anyway, I'm so messed up now that I really just need to flush it all and start over. I have reinstalled Rails, and now the default gemset is empty. I am unable to figure out at this point how to repopulate it with the default gems (uninstalling and reinstalling Rails did not do this for me).
At this point I'm so far down a rabbit hole that I'm unable to orientate myself, so I feel like I need to just resurface and start over from zero fresh. How would I go about resetting my environment such that I can do this? I assume I need to uninstall Rails, RVM, etc?
First, make sure you are running Mac OS X Mavericks (10.9).
Start by uninstalling Ruby, for example:
$ rvm remove ruby-2.1.1
More info is on the Removing Rubies page on the RVM site.
Then carefully follow the guide Install Ruby on Rails - Mac OS X Mavericks to install Ruby 2.1.1 and Rails 4.1.
If things don't look right, for example if RVM is giving error messages, you can escalate by uninstalling RVM itself. This will removes all Ruby installations RVM manages, and everything in ~/.rvm:
$ rvm implode
Follow the Install Ruby on Rails - Mac OS X Mavericks to reinstall RVM, Ruby 2.1.1 and Rails. Take notes as you go and if you encounter any difficulties, ask a new Stack Overflow question, supplying the exact error messages and conditions that created the error. Installing Rails is the biggest obstacle to learning Rails, so good luck, and I'm sure you will succeed with the help you find here.
Yes, my teammate had this issue on linux box. He had to completely wipe ALL rails installations. Re-download/install rails installer (http://railsinstaller.org/en) for whatever OS you are using. I dont know what IDE you use... but in our case we use Eclipse with aptana. Reinstall that too then link everything back together. Then in your IDE you should have option to make a default project by calling rails new blog(replace blog with whatever your project name would be) After which you should have fresh project to work with. Don't forget to do bundle install

Constant Error Running Ruby on Rails on Windows 8

I've almost pulled out all the remaining hair on my bald head. I've been tinkering with Ruby on Rails on Windows 7 and it works great. I use RailsInstaller 2.2.1 and AptanaStudio3 as my IDE on Windows 7 64bits.
However, going through similar process, I installed these two tools on my 64bit Windows 8 and all hell as been let loose for the past 3 days. RoR projects that run flawlessly on the win 7 do not run on Win 8 with Ruby 1.9.3 p392 and Rails 3.2.13.
Anytime I run launch the server with:
$ rails s
←[31mCould not find rake-10.1.0 in any of the sources←[0m
←[33mRun `bundle install` to install missing gems.←[0m
And
$ bundle install
gives:
$ bundle install
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundler/v
endor/net/http/persistent/ssl_reuse.rb:29:in initialize': Bad address - connect
(2) (Errno::EFAULT)
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/
lib/bundler/vendor/net/http/persistent/ssl_reuse.rb:29:inopen'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/
lib/bundler/vendor/net/http/persistent/ssl_reuse.rb:29:in block in connect'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/timeout.rb:54:intimeou
t'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/timeout.rb:99:in timeou
t'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/
lib/bundler/vendor/net/http/persistent/ssl_reuse.rb:29:inconnect'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:755:in `do_s
tart'
I've uninstalled and re-installed countless times but no solution. I'm considering installing virtual machine with Win 7 since it works smoothly on Win7. But that means installing another OS.... I'd like to know if others have had success with RoR on Windows 8.
Thanks
I myself tried using RoR on Windows 8 and could not find a solution to the issues I was running into. My suggestion is to keep with Windows 7, wait a little longer until Windows 8's bugs are sorted out.
I'm running rails on Win8 just fine. I checked my rake version, and it is indeed 10.1.0. Try doing gem uninstall rake, and then gem install rake --version 10.1.0. Then try bundler again.
I ran into something similar what I cloned the app I was developing on win8 onto a win 7 machine. The gemfile.lock from win8 was specifying a version of rake that win7 didn't like.
PS: I sympathize with the hair thing. Not much left here either. Hard to "get a grip" some days :-)

Trying to get Ruby/Rails installed on OSX Mountain Lion

This is my first question please be nice.
I've been trying to get my hands dirty with ruby/rails for a small coding project. I have Mountain Lion, and have been trying to use various techniques i've found on stackoverflow, and across the interwebs. It's not going so great! Nothing works of course. I have the system version of Ruby (1.8.7) as of now, and a bunch of broken junk from trying and failing to install Ruby!
When I install Rails via gem install, it sat for awhile... I finally learned to use -V, and noticed everything was returning back 302, and this takes forever, and finally it installs -- I get this output when I try to run rails -v
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:230:in `activate': can't activate rack (~> 1.4.5, runtime) for ["actionpack-3.2.13", "railties-3.2.13"], already activated rack-1.5.2 for ["rack-ssl-1.3.3", "railties-3.2.13"] (Gem::LoadError)
It looks like some dependencies are broken? Anyhow I'm now trying to use RVM now to get another version of ruby and setup grails with brew, This is telling me that I need a newer version of ruby to install anything pretty much?? Here is the output.
rvm install 1.9.2-head
Installing requirements for osx, might require sudo password.
Skipping brew update make sure your formulas are up to date.
Cowardly refusing to continue, please read 'rvm autolibs'.
To proceed rvm requires a ruby-1.9|ruby-2 compatible ruby is installed.
We attempted to install ruby automatically but it failed.
Please install it manually (or a compatible alternative) to proceed.
-- I am getting os frustrated here, please throw me a bone and help me out --- If I have to have to I'll setup a linux vm just to get rails running -- yet I prefer working on my mac.
Please any advice?? I just want a working version of Rails 3 on my Mac this is allThanks in advance
Please go through www.railsinstaller.org for detailed installation and setup process. This guide should answer all of your questions.
Have you tried this tutorial http://net.tutsplus.com/tutorials/ruby/how-to-install-ruby-on-a-mac/
The tutorial includes all the errors you may come across during the installation.
According to this tutorial Ruby on Rail comes with the mac out of the box.
Have you tried JewelryBox? It provides a painless install method for rvm and a great little gui that helps you monitor the size of your gem sets, and installs of ruby. Along with helpful reminders to upgrade rvm. I resisted at first using it, because using a GUI made me feel like a noob, but it really is a great little tool, that makes for super easy installs of ruby, and rvm, and consequently rails.
http://jewelrybox.unfiniti.com/

Restarting Rails for terminal session

I was doing the Ruby on Rails tutorial by Martl and closed my terminal on my Mac. I had reached Chapter 10 without a problem. When I opened another terminal nothing is working. When I run bundle install I get the following error message:
/Library/Ruby/Site/1.8/rubygems/dependency.rb:247:in to_specs': Could not find bundler (>= 0) amongst [rake-0.8.7, rake-0.8.7] (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems/dependency.rb:256:into_spec'
from /Library/Ruby/Site/1.8/rubygems.rb:1182:in `gem'
from /usr/bin/bundle:18
How do I get my terminal back to where it was?
Sounds like your RVM environment is not being loaded when you restart your terminal. The Ruby On Rails tutorial glosses over RVM installation rather quickly and thats why this step often gets missed.
Check out the RVM installation guide here in particular Section 2 which describes how to ensure the RVM commands go into your .bash_profile.
Let me know if you need further help.

Resources