Ruby on Rails install trouble on OSX with dependencies - ruby

I'm trying to install RoR on Mountain Lion. I have the following installed:
Xcode from the App Store with command line tools
RVM
homebrew
In terminal I verified that gcc is installed.
When I type in "rvm requirements" I get a message saying that I'm missing a number of dependencies including OpenSSL, autoconf, automake, libxslt and many more. RVM also says to install these with brew. So I do and rvm no longer complains about the missing dependencies.
But when I try to install ruby 1.9.3 via "rvm install 1.9.3", at the end of the compile I receive a message "ruby was built using clang -but it's not (fully) supported, expect errors."
I'm stumped at this point. I'm trying to figure out:
Why are dependencies missing when I've installed Xcode command line tools?
Why am I still getting a compile error after using brew to install the dependencies?
Help please. :)

Try using gcc compiler instead i.e
rvm install 1.9.3 --with-gcc-4.2
Reference: https://github.com/wayneeseguin/rvm/issues/1480

So here's the order I usually go through before installing any Rubies.
1st thing: Install XCode and the Command Line Tools for Mountain Lion (you can also install these from the Preferences > Downloads window).
2nd: Make sure you have Homebrew installed.
3rd: Once that's set up, run brew tap homebrew/dupes
4th: Then brew install openssl autoconf apple-gcc42 automake
I had issues with RVM and have long since switched to RBenv/Ruby-Build. There are various differences, but really running through the above steps should fix any issues you had, and lots of people use one or the other. Both are great.
Then, just try to install Ruby however you choose to.

Related

pdf2swf not installed through Homebrew – but the rest of swftools are

Environment OSX 10.9.5
I am trying to install swftools so that I can use pdf2swf. I am installing through HomeBrew. I've seen various notes about pdf2swf failing to install if its dependencies have not been previously installed. So using the command at the link I use:
$ brew install freetype libjpeg giflib swftools
And it completes without error – except pdf2swf is not installed. When I look in usr/local/bin, I see the other swftools are installed successfully.
Does anyone know what might be wrong?
Update: For completeness if anyone comes across this question looking to use pdf2swf in an AIR desktop app: you can't. Apparently pdf2swf compiles the swf with certain "AllowDomain" security settings and there is no option to not do that. Short of editing the source code and compiling pdf2swf oneself, it seems a deadend.
If you look at the brew formula: brew edit swftools, PDF support comes via xpdf and this is not included by default as XQuartz needs to be installed:
brew instal swftools --with-xpdf
swftools: XQuartz is required to install this formula.
You can install with Homebrew Cask:
brew install Caskroom/cask/xquartz
You can download from:
https://xquartz.macosforge.org
Error: An unsatisfied requirement failed this build.
So:
Install XQuartz
brew install swftools --with-xpdf

RVM requirements error

I have OS X Mavericks installed and I'm trying to run rvm requirements in terminal and it gives me this error.
Installing required packages: autoconf, automake, libtool, pkgconfig, libyaml, libffi, readline, libksba, curl-ca-bundle, gdbm.............
Error running 'requirements_osx_port_libs_install autoconf automake libtool pkgconfig libyaml libffi readline libksba curl-ca-bundle gdbm',
please read /Users/Alex/.rvm/log/ruby-1.9.3-p448/1374263757_package_install_autoconf_automake_libtool_pkgconfig_libyaml_libffi_readline_libksba_curl-ca-bundle_gdbm.log
Requirements installation failed with status: 1.
It looks like RVM tried to install some dependencies using Macports and Macports proceeded to get really confused about dependencies when it tried to install autoconf.
Try running:
brew install autoconf
Otherwise you should run this bash script:
https://gist.github.com/siraj/1399288
Assuming you have brew, which you should if you don't.
If your Macports just isn't working, then you can manually install all of the requirements like this:
brew install autoconf automake libtool pkgconfig libyaml libffi readline libksba curl-ca-bundle gdbm
I tried the above, and a few other things. None worked.
It seems that on OSX 10.9 and XCode5 moved some libs around on us. So I had to install XCode5-DP6 (Dev Preview 6), opened up DP6 and in the settings, you have to tell the command line tools to use the new DP6 build and not the Standard XCode from the marketplace.
First, I had to install homebrew. Nothing liked to play with macports. I am on my first mac as of only a month ago, so macports was just what solved apache for me at the time. I then had to run 'brew install autoconf'
Once I did that I then ran rvm requirements, everything installed without issue. then sudo gem install jekyll from there and it all works like a charm now.
I'm sure once Mavericks is actually released this will get ironed out. We are using early releases after all...
Hope this works for you guys.

How can I install GNU Octave on Mac with Fink ?

I tried to install GNU Octave on my Mac using Fink by this instruction
http://wiki.octave.org/Octave_for_MacOS_X
I think I have followed all the instructions but I can't run Octave.
How can I check if it is installed correctly?
I tried typing 'octave' in the terminal but it says 'command not found'
Or, is there any easy instruction for Octave installation?
I've found many install guides but they are all different and assumes some knowledge.
Incidentally, I have installed Octave GNU today twice on two different machines (both running Lion).
I needed the latest version of Octave (3.6.4), and used Homebrew.
I already had XCode installed, so the rest:
Install Homebrew
Based on the instructions in this page, I ran:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Install Octave
Following this guide, I ran:
brew tap homebrew/science
brew update && brew upgrade
brew install gfortran
brew install octave
Install AquaTerm
Notice that you need this before you install gnuplot (or gnuplot won't see aqua as a valid terminal and you may get 'unknown or ambiguous terminal type' error).
Simply downloaded the latest version (1.1.0) dmg from SourceForge.
Install gnuplot
brew install gnuplot
You could try installing it with Home Brew. Once you download and install Home Brew, use this guide to get Octave installed.
Easiest option would be using the precompilled .app
I've tried the precompiled .app, but had issues with certain functions (like sound),
whereas the macports version always worked.
I usually install it using macports:
sudo port install octave
for the basics.
You might need other port variants/octave modules installed:
sudo port install octave octave-signal octave-plot octave-image octave-signal
Need to have XCode with Command Line Tools first and Macports with this route though
How to know if a Fink package is installed
By default (and this should be your case too if you didn't changed it), Fink installs everything under /sw, i.e. the binaries you are looking for should be in /sw/bin/.
Run ls /sw/bin/octave*and, depending on the output, you then have two choices :
Either the Octave binary is inside /sw/bin, in that case run echo $PATH and learn more about PATH Variable to fix your problem.
Otherwise, if there is nothing inside, there might have been a problem with the install. Try running fink install octave once more, look closely at the output and update your post if necessary.
This is simply an update on the instruction provided by Izhaki (that I ran on Mac OSX 10.8.4).
You may be required to update XCode to 4.6.3. This can be done through the AppStore.
If you encounter the error:
Error: Download failed: http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz
during
brew install octave
Then invoke:
brew update
brew install octave
and the install will pick up where it left off. Other than that, the instruction worked seamlessly.

Install Ruby with Mountain Lion, Xcode 4.5, and RVM?

rvm install 1.9.3 --with-gcc=clang (as suggested by Can't install Ruby under Lion with RVM – GCC issues) doesn't work because neither Mac OS X 10.8.2 (Mountain Lion) nor Xcode 4.5 comes with clang.
Is it possible to compile Ruby with llvm?
According to Matthias Schmidt's "How to install Ruby 1.9.3 on Mac OS X with LLVM and rbenv", Ruby is now fully compatible with LLVM.
But, I still get: error: C compiler cannot create executables
UPDATE:
Actually, I found clang here /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang (thanks to the Node.js Installation Wiki). I just didn't have clang in my path.
So, if I add clang to my path, is rvm install 1.9.3 --with-gcc=clang sufficient?
From RVM notes:
Homebrew:
If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
This can live side by side with an existing Xcode 4.2+ install or Command Line Tools for Xcode.
osx-gcc-installer:
If you don't use Homebrew, you can download and install osx-gcc-installer:
https://github.com/kennethreitz/osx-gcc-installer.
Hope it will help you.
no, ruby is not fully compatible with llvm, there is at least one issue with Fibers and other issues might occur if version of llvm changes.
Ruby works best with gcc-4.2, rvm provides information how to get it (+other important stuff):
rvm requirements
I used this: http://railsinstaller.org/mac - and it was a BREEZE. Also I like the sublime text editor, found that through this resource... Maybe I'll say goodbye to macvim! Imagine that.

How can I install Ruby 1.9.3 in Mac OS X Mountain Lion without Xcode?

I would like to know about alternative ways to build a development machine for Ruby 1.9.3 on OS X 10.8 Mountain Lion, that does not require Xcode.
Mountain Lion is now Golden Master as I'm writing this question, so it could be considered as final version. That cannot be said about Xcode, that is a preview release yet.
RVM recommends to install osx-gcc-installer over Xcode, but I would like not to mess my system.
What is the cleanest way to install Ruby 1.9.3 on Mountain Lion without Xcode?
osx-gcc-installer turns out to be a very good option to replace Xcode in order to install Ruby 1.9.3
These are the steps I have followed:
Download & install the latest version of osx-gcc-installer here (GCC-10.7-v2 is fine): https://github.com/kennethreitz/osx-gcc-installer
Install RVM as usual and select 1.9.3-head as the default ruby installation: https://rvm.io/rvm/install/
Install Homebrew: https://github.com/mxcl/homebrew/wiki/installation
Install libksba to resolve some dependencies with Ruby 1.9.3: brew install libksba
That's it! You should now have Ruby 1.9.3 installed on Mountain Lion working perfectly.
If you need some other packages, install them now through Homebrew, such as Imagemagick for example: brew install imagemagick
It's possible that you need XQuartz for Homebrew to work properly, as Apple is not shipping X11 since Mountain Lion. You can download it here: http://xquartz.macosforge.org/trac/wiki
EDIT:
Now (since 29th July) Command line tools for Xcode 4.4 are available.
So, the new steps are these:
Download & install Command line tools for Xcode 4.4 (you don't need to download Xcode): https://developer.apple.com/downloads/index.action
Install Homebrew: https://github.com/mxcl/homebrew/wiki/installation
Install automake: brew install automake
Install RVM as usual and select 1.9.3-head as the default ruby installation: https://rvm.io/rvm/install/
Optional step: You may need XQuartz for some components, for example for Imagemagick, so download & install XQuartz: http://xquartz.macosforge.org/trac/wiki
I also had to add this:
export CC=/usr/bin/gcc-4.2
in order to make the Apple command line tools work with the rvm. Without this I had repeated llvm issues:
The provided CC(gcc) is LLVM based, it is not yet fully supported by ruby and gems, please read rvm requirements.
I had to add
export CPPFLAGS=-I/opt/X11/include
as well as
export CC=/usr/local/bin/gcc-4.2
I was still getting compilation errors due to readline (things like readline.c: In function ‘readline_s_vi_editing_mode_p’: in the make.log file), and the RVM readline page didn't seem to help, so I ran
brew install readline
followed by
rvm install 1.9.3 -C --with-readline-dir=/usr/local/Cellar/readline/6.2.4

Resources