[personal profile] alexbayleaf in [community profile] growstuff
One 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:

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.

on 2012-08-04 12:58 pm (UTC)
cesy: "Cesy" - An old-fashioned quill and ink (Default)
Posted by [personal profile] cesy
AO3 instructions for OS-X don't address your particular problem, but their recommended packages may get you around it.

Markedli also had an Ubuntu VM to use with VirtualBox - that's much easier to use than actually getting RoR working on Windows.

Profile

The Growstuff Project

April 2021

S M T W T F S
    123
45678910
11121314151617
18192021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 29th, 2025 01:37 pm
Powered by Dreamwidth Studios