Lots of problems installing on OSX

Hi,

I’m having problems getting RoR to work nicely on tiger.
Setting up a test appliacation works without a glitch.

However, trying to run my existing app (working on winxp and debian) is
a real challenge - for me.
First there is this error:

uninitialized constant Magick

RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace | Full Trace

/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:200:in
`const_missing’
#{RAILS_ROOT}/app/models/player.rb:2
#{RAILS_ROOT}/app/models/user.rb:1
./script/…/config/…/app/controllers/application.rb:8


This error occured while loading the following files:
script/…/config/…/app/controllers/application.rb
=> model user.rb
user.rb
player.rb
magick.rb

To top it off, I get this one running script/console

Vigor12:~/tennis jeroen$ ruby script/console
Loading development environment.
/usr/lib/ruby/1.8/irb/completion.rb:10:in require': No such file to load -- readline (LoadError) from /usr/lib/ruby/1.8/irb/completion.rb:10 from /usr/lib/ruby/1.8/irb/init.rb:218:inrequire’
from /usr/lib/ruby/1.8/irb/init.rb:218:in load_modules' from /usr/lib/ruby/1.8/irb/init.rb:216:ineach’
from /usr/lib/ruby/1.8/irb/init.rb:216:in load_modules' from /usr/lib/ruby/1.8/irb/init.rb:21:insetup’
from /usr/lib/ruby/1.8/irb.rb:54:in `start’
from /usr/bin/irb:13
Vigor12:~/tennis jeroen$

This is my first week on Mac, so this might actually not be too hard to
solve, I just cant’t work it out.

I have compiled ImageMagick and installed the Rmagick gem successfully,
or so their outputs makes me believe.

Help is much appreciated!

Jeroen

Hi Jeroen,

Sounds like you may have the problem described here (solution included):

http://tech.rufy.com/entry/46

There may be other ways to address it as well, but this is the route
I went down some time back.

Steven

Steven S. wrote:

Hi Jeroen,

Sounds like you may have the problem described here (solution included):

http://tech.rufy.com/entry/46

There may be other ways to address it as well, but this is the route I
went down some time back.

Hey, that looks petty good. I wonder though, what if I already have ruby
RoR and rubygems 0.8.11 installed. Is that a problem? Will it overwrite
this or is there a quick uninstall for gems and rails?

Thanks a lot btw!

J

Jeroen H. wrote:

However, trying to run my existing app (working on winxp and debian) is
a real challenge - for me.

You might also check out Locomotive. It’s incredibly convenient,
and the Max bundles include RMagick.

–Steve

Not sure, but you could pull the script down (Lucas Carlson | Entrepreneur, Author, and Technology Executive
tiger.sh) and see what versions it’s expecting now – it may have
been updated. Also, you could always change the versions in your
local copy.

Additionally, make sure you read the comments in the blog entry as
there are some additional hints in there as well.

Steven

Steven S. wrote:

Not sure, but you could pull the script down
(Lucas Carlson | Entrepreneur, Author, and Technology Executive) and see what versions it’s expecting now –
it may have been updated. Also, you could always change the versions in
your local copy.

Additionally, make sure you read the comments in the blog entry as there
are some additional hints in there as well.

yeah will do that tomorrow, off to bed now.
I did just go ahead and ran the script but it was complaining about ruby
header files not being there and suggested I install Xcode from the CD.
I did install Xcode from the apple’s site so I don’t know what’s up
there.

I’ll have a closer look tomorrow. My Mac and its OS sure are pretty and
all but I must say I was up and running with rails a lot quicker on both
Debian and Windows…

Thanks for your help, I appreciate it!

Jeroen

Do you have fink (fink.sourceforge.net) installed? I couldnt get rails
running on os x even after following the instructions to fix osx’s ruby.
I
found it much easier to install ruby through fink than to fix the apple
ruby installation. It also means you can use fink to install any other
unix
software that you need.

AF

I’ve had good luck with 10.4 (Tiger) + fix-ruby-tiger.sh + Developer
Tools from the Tiger DVD. I don’t recommend the latest XCode update
from Apple’s developer site, though.

I’ve only had to fall back on Fink and Darwin Ports for Fox and Gnome
– both have many dependent libraries that require some elbow grease
and know-how to build properly on OS X.

Scott

steve wrote:

You might also check out [Locomotive][1]. It’s incredibly convenient,
and the Max bundles include RMagick.
[1]: http://locomotive.sourceforge.net/

i strongly recommend locomotive as well. i had rails up and running the
traditional way on my mac, but since locomotive has come around i run
everything through it. it just makes it so easy, gives you a centralized
command center for all your rails projects, has commands to open each
project in your editor (great to open as a project in textmate) and in
your choice of terminal with the locomotive environment, and the max
bundles include most of what you’d need.

toby

toby sterrett wrote:

bundles include most of what you’d need.
Is there a way to do testing from inside Locomotive? If not, you still
have to have a complete installation to run your tests.

Thanks,

Ray

Hi Scott,

Scott W. wrote:

I’ve had good luck with 10.4 (Tiger) + fix-ruby-tiger.sh + Developer
Tools from the Tiger DVD. I don’t recommend the latest XCode update
from Apple’s developer site, though.

Okay. What’s wrong with the latest XCode update from their site then?
Do you have script/console and script/breakpointer working find with
readline support? And how about RMagick, how did you install that?

I installed Lokomotive and that worked as advertised but I get funny
errors trying to run script/breakpointer - it won’t start. I would also
prefer to have a “normal” installation. I think I’ve pretty much
polluted my system to a point where it’s better to do a complete
reinstall of the OS, so you’re saying I shouldn’t install XCode from the
Apple site but use the CD?

Jeroen

Ezra Z. wrote:
[…]

Guys-

Here are some instructions for installing the whole ruby/gems/rails/ 
   ^^^^ Where?

lighttpd/fcgi from source on OSX. I have used these many times to do
installs of rails and ruby that do have readline support and everything
else. I would follow these instructions and rename the original apple
ruby to ruby.orig and irb to irb.orig. The instuctions install into
/usr/local/bin so make sure that is in your $PATH before /usr/bin and
you should be good to go!

Please :slight_smile:

Justin

On Dec 1, 2005, at 12:44 AM, Jeroen H. wrote:

that?

I installed Lokomotive and that worked as advertised but I get
funny errors trying to run script/breakpointer - it won’t start. I
would also prefer to have a “normal” installation. I think I’ve
pretty much polluted my system to a point where it’s better to do a
complete reinstall of the OS, so you’re saying I shouldn’t install
XCode from the Apple site but use the CD?

Jeroen


Guys-

Here are some instructions for installing the whole ruby/gems/rails/

lighttpd/fcgi from source on OSX. I have used these many times to do
installs of rails and ruby that do have readline support and
everything else. I would follow these instructions and rename the
original apple ruby to ruby.orig and irb to irb.orig. The instuctions
install into /usr/local/bin so make sure that is in your $PATH
before /usr/bin and you should be good to go!

Cheers-

-Ezra Z.
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
[email protected]

On 12/1/05, Ray B. [email protected] wrote:

Is there a way to do testing from inside Locomotive? If not, you still
have to have a complete installation to run your tests.

Absolutely. Locomotive gives you full access to a rails-enabled
terminal.

–Alison

On Dec 1, 2005, at 5:16 PM, Justin F. wrote:

instuctions install into /usr/local/bin so make sure that is in
your $PATH before /usr/bin and you should be good to go!

Please :slight_smile:

Justin

Sorry about that I could have sword I pasted the link in:

http://brainspl.at/pages/rails_stack

Cheers-

-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
[email protected]
509-577-7732

Ezra Z. wrote:

Sorry about that I could have sword I pasted the link in:

http://brainspl.at/pages/rails_stack

Cheers-

Great! Thanks

Justin

Justin F. wrote:

Ezra Z. wrote:

Sorry about that I could have sword I pasted the link in:

http://brainspl.at/pages/rails_stack

Cheers-

Great! Thanks

One question, though - why is the bit about PHP needed? (And if it is
needed, where is the source downloaded from?)

thanks

Justin

On Dec 1, 2005, at 10:34 PM, Justin F. wrote:

is needed, where is the source downloaded from?)

thanks

Justin


The php part is only there if you need to run php apps under lighttpd/
fcgi. I like to run phpmyadmin out of the public dir of my rails app
sometimes. You don’t need that part unless you need php.

Cheers

-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
[email protected]
509-577-7732

Ezra Z. wrote:

The php part is only there if you need to run php apps under lighttpd/
fcgi. I like to run phpmyadmin out of the public dir of my rails app
sometimes. You don’t need that part unless you need php.

Thanks. I think I’ll scrap my attempt at using DarwinPorts, reinstall
Tiger on my Mac Mini, and build everything from source as you advise.

regards

Justin

On 29-nov-2005, at 22:43, Jeroen H. wrote:

This error occured while loading the following files:
/usr/lib/ruby/1.8/irb/completion.rb:10:in `require’: No such file

This is my first week on Mac, so this might actually not be too
hard to solve, I just cant’t work it out.

I have compiled ImageMagick and installed the Rmagick gem
successfully, or so their outputs makes me believe.

Help is much appreciated!

Readline has nothing to do with Magick. Magick won’t get loaded
automatically - you have to explicitly require’ it in your app like

require ‘RMagick’

before you call any Magick:: functionality. MIND THE CAPS. Try if
this works for you in plain irb:

require ‘rubygems’
require ‘RMagick’

If you don’t get it sorted out in a couple of days just shoot me a
mail and I’ll get it fixed up for you in Utrecht (provided you have a
laptop and like beer).


Julian ‘Julik’ Tarkhanov
me at julik.nl