Where Are the Gems When Ruby Compiled Manually in MAC Os X 10.6.8

Which resource did you find to be the most helpful when making a gem?

Jeweler is an awesome tool that does most of the packaging / gem layout work for you. I've used it in every gem I've made.

Which resource did you find to be the most helpful when making a gem?

Jeweler is an awesome tool that does most of the packaging / gem layout work for you. I've used it in every gem I've made.

-bash: slather: command not found

A bit like in this question, check your gem environment, gem env and your $PATH

Look for the executable slather in one of the gem paths, and make sure the full path is referenced in your current $PATH.

Ruby on Rails / PostgreSQL - Library not loaded error when starting server

The key part of the error is:

Library not loaded: libpq.5.dylib (LoadError)

This suggests that ruby can't find libpq at runtime. To address that you should probably set the DYLD_LIBRARY_PATH environment variable to point to the lib directory of your PostgreSQL install, either globally or in a wrapper script you use to start Rails. See this superuser question for some more info.

The Pg gem can find the library during compilation and installation because the pg_config executable is on the PATH and it uses that to find libpq. It appears that it doesn't store the path for use at runtime so you have to set the runtime dynamic linker up yourself.

A simple wrapper script (in case you don't want to modify your global environment) is something like:

#!/bin/bash
export DYLD_LIBRARY_PATH=/path/to/pg/lib
exec rails "$@"

The "$@" basically means "pass all arguments to this script through as if they were passed here directly". It preserves quoting correctly and essentially means that the rails command can't tell you didn't run it directly.

Unable to install therubyracer

I just hit the exact same error. I looked at the gem details at https://rubygems.org/gems/therubyracer and it seems we were "lucky" enough to bundle a new version on the release day.

This appears to already be reported: https://github.com/cowboyd/therubyracer/issues/215

So, I figured the easiest thing is to use the last version of the gem. So I updated my Gemfile to point to the last version like so:

gem "therubyracer", "~> 0.10.2"

and I was able to successfully install the gem.

If you want to manually install the gem, you can use:

gem install therubyracer --version "~> 0.10.2"

The compiler failed to generate an executable file. (RuntimeError)

It turns out this is a bug in RailsInstaller OSX 1.0.3 - (Found that out while reading Problems installing Ruby on Mountain Lion - ruby 1.9.3 wont' compile)

I needed to change /etc/rvmrc to contain this:

umask g+w
export -a rvm_configure_env
rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')

For more info see: https://github.com/railsinstaller/railsinstaller-nix/issues/10



Related Topics



Leave a reply



Submit