What are the Conventional GEM PATHS for Ruby under OS X 10.5?
Yep. That all looks pretty standard to me. My mac running MacOS 10.5 similarly has nothing in ~/.gem/ruby/1.8/gems/ and quite a bit in the other two locations.
Understanding RubyGems, Macports, and /opt/ versus /Library/
MacPorts installs itself, as well as its ports, under /opt/local
, to avoid "polluting" /usr
, /usr/local
, etc. If you installed RubyGems via MacPorts, it'll exist under /opt/local
; likewise, any gem you install (globally) will also be under /opt/local
.
If you install RubyGems manually, or use the version that ships with OS X, it'll install gems under /Library
instead. That's why some tutorials reference /Library
instead of /opt/local
.
If you use a version of Ruby provided by MacPorts, it's probably easier and better to store gems under /opt/local
; conversely, if you use the Ruby that ships with OS X, or you installed your own version, it might be better to keep gems under /Library
. But it doesn't matter which place you keep them, or whether you have gems spread across both directories.
Can't install Ruby under Lion with RVM – GCC issues
This answer was edited multiple times and now contains several alternative solutions. Try the simple “Edit 3” solution first.
Ruby 1.9.3-p125 and later have official support for clang, so if you are installing such a version you should not need GCC. If you’re installing an older version of Ruby, read on.
To compile Ruby with GCC, you need a non-LLVM version of GCC, which is no longer included with Xcode 4.2. Install it yourself (or downgrade to Xcode 4.1 temporarily), then do CC=/usr/local/bin/gcc-4.2 rvm install 1.9.3 --enable-shared
(substituting the path to your non-LLVM gcc).
Edit: https://github.com/kennethreitz/osx-gcc-installer/downloads may help for installing GCC. There is also some info available by running rvm requirements
.
Edit 2: For an easier solution, you can try adding --with-gcc=clang
to the arguments to configure
for Ruby to use clang instead of GCC.
Edit 3: rvm install 1.9.3 --with-gcc=clang
does that for you.
Note: With current versions of Xcode you need to install the command-line tools separately from the Xcode menu -> Preferences -> Downloads -> Components. This is a pre-requisite for doing any compiling with Xcode on the command-line, not just Ruby.
Note 2: If something doesn't work after following the steps, try doing a reboot or re-login to ensure that the environment gets set correctly.
Note 3: Ruby versions prior to 1.9.3-p125 may not always be fully compatible with clang, so test your software thoroughly if using the “edit 3” solution in a production environment.
Is there some way to PUSH data from web server to browser?
Yes, what you're looking for is COMET http://en.wikipedia.org/wiki/Comet_(programming). Other good Google terms to search for are AJAX-push and reverse-ajax.
Related Topics
Gem::Ext::Builderror: Error: Failed to Build Gem Native Extension Bcrypt-Ruby
@Instance_Variable Not Available Inside a Ruby Block
Why I Can Not Call Super in Define_Method with Overloading Method
Displaying Only the First X Words of a String in Rails
How to Use a Branch in a Fork of Rails in a Project with Bundler
How Are Array.Each and Array.Map Different
Is It Acceptable Practice to Patch Ruby's Base Classes, Such as Fixnum
Cant Use Has_Secure_Password, Password_Digest Error
Executing Shell Command in Background from Ruby with Proper Argument Escaping
Converting Date Object to Timewithzone
How to Configure Action Mailer (Should I Register Domain)
How to Create a List of Months Between Two Dates in Rails
Webkit_Server Hangs Periodically When Run from Capybara in Ruby
How Does Ruby Serialization (Marshaling) Work
Using Named Captures with Regex Match in Ruby's Case...When
Passenger Installation with Nginx Fails
In Ruby, How to I Control the Order in Which Test::Unit Tests Are Run