Pre-iteration-0: installing rails
Aug. 4th, 2012 01:38 pmOne of the things I'm doing to get ready for iteration 0 is to install Ruby on Rails and get it running on my local machine. If any of you are interested in doing code-related stuff for Growstuff, I suggest you do likewise!
I'm no expert in this -- I did it a couple of times over the last 5 years just to play around with but never really went anywhere with it -- so I can't offer any particular help or instructions, apart from what I found via google.
If you use Mac OS/X I've started to collect some links/instructions here: https://github.com/Growstuff/project/wiki/OSX%20Development%20Environment
If others are trying to get up and running on Windows or Linux, I suggest googling for "Install Rails 3.2 on Windows" or "Install Rails 3.2 on Linux" and see what you get (and then post the links in the comments, or add them to the wiki if you are comfortable doing that.)
That said, I am having trouble getting things going on OSX and I was wondering whether anyone with more experience could help me.
I'm running OSX 10.7.4 (Lion) and have installed the XCode via the App Store (currently version 4.3.2, and yes I know there's an update, but I'm pretty sure that's not the problem). The command line tools (compilers etc) wound up in /Developer/usr/bin as you'd expect:
Following the instructions at http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac/ I get as far as installing rvm and fetching Ruby 1.9.3 but then I can't compile it.
configure.log says:
Using --with-gcc=clang results in exactly the same problem.
So, anyone know what could be causing this "C compiler cannot create executables" thing? It sounds like a compiler that's lost its raison d'etre, poor thing.
Apart from that, if anyone else is trying to get Rails running and has any tips or questions or problems, please post them in the comments.
I'm no expert in this -- I did it a couple of times over the last 5 years just to play around with but never really went anywhere with it -- so I can't offer any particular help or instructions, apart from what I found via google.
If you use Mac OS/X I've started to collect some links/instructions here: https://github.com/Growstuff/project/wiki/OSX%20Development%20Environment
If others are trying to get up and running on Windows or Linux, I suggest googling for "Install Rails 3.2 on Windows" or "Install Rails 3.2 on Linux" and see what you get (and then post the links in the comments, or add them to the wiki if you are comfortable doing that.)
That said, I am having trouble getting things going on OSX and I was wondering whether anyone with more experience could help me.
I'm running OSX 10.7.4 (Lion) and have installed the XCode via the App Store (currently version 4.3.2, and yes I know there's an update, but I'm pretty sure that's not the problem). The command line tools (compilers etc) wound up in /Developer/usr/bin as you'd expect:
skud@Watson-3873:~$ which gcc /Developer/usr/bin/gcc skud@Watson-3873:~$ gcc -v Using built-in specs. Target: i686-apple-darwin10 Configured with: /var/tmp/gcc/gcc-5659~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5659) skud@Watson-3873:~$ which clang /Developer/usr/bin/clang skud@Watson-3873:~$ clang -v clang version 1.0.2 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-32 exported) Target: x86_64-apple-darwin11
Following the instructions at http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac/ I get as far as installing rvm and fetching Ruby 1.9.3 but then I can't compile it.
skud@Watson-3873:~$ rvm cleanup all
Cleaning up rvm directory '/Users/skud/.rvm/archives'
Cleaning up rvm directory '/Users/skud/.rvm/repos'
Cleaning up rvm directory '/Users/skud/.rvm/src'
Cleaning up rvm directory '/Users/skud/.rvm/log'
Cleaning up rvm directory '/Users/skud/.rvm/tmp'
skud@Watson-3873:~$ rvm install 1.9.3
Installing Ruby from source to: /Users/skud/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #fetching
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9610k 100 9610k 0 0 171k 0 0:00:55 0:00:55 --:--:-- 228k
ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /Users/skud/.rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #extracted to /Users/skud/.rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #configuring
Error running ' ./configure --prefix=/Users/skud/.rvm/rubies/ruby-1.9.3-p194 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/skud/.rvm/usr ', please read /Users/skud/.rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.
configure.log says:
skud@Watson-3873:~$ cat /Users/skud/.rvm/log/ruby-1.9.3-p194/configure.log [2012-08-01 19:42:16] ./configure --prefix=/Users/skud/.rvm/rubies/ruby-1.9.3-p194 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/skud/.rvm/usr configure: WARNING: unrecognized options: --with-libyaml checking build system type... x86_64-apple-darwin11.4.0 checking host system type... x86_64-apple-darwin11.4.0 checking target system type... x86_64-apple-darwin11.4.0 checking whether the C compiler works... no configure: error: in `/Users/skud/.rvm/src/ruby-1.9.3-p194': configure: error: C compiler cannot create executables See `config.log' for more details
Using --with-gcc=clang results in exactly the same problem.
So, anyone know what could be causing this "C compiler cannot create executables" thing? It sounds like a compiler that's lost its raison d'etre, poor thing.
Apart from that, if anyone else is trying to get Rails running and has any tips or questions or problems, please post them in the comments.
no subject
on 2012-08-06 10:23 am (UTC)