Category - Mac OSX

Mac rbenv

# git clone ~/.rbenv
# cd ~/.rbenv && src/configure && make -C src

# vi .bash_profile

# rbenv
export RBENV_ROOT="$HOME/.rbenv"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

# source ~/.bash_profile

# mkdir -p "$(rbenv root)"/plugins
# git clone "$(rbenv root)"/plugins/ruby-build
# rbenv install 2.7.0
# rbenv global 2.7.0
# gem install railties && rbenv rehash
# gem install sqlite3 puma sass-rails uglifier coffee-rails jquery-rails turbolinks jbuilder byebug web-console listen spring spring-watcher-listen
# gem update --system
# gem update

read more

You don't have write permissions for the /usr/bin directory.

% sudo gem install rails
Fetching zeitwerk-2.3.0.gem
Fetching activesupport-
Fetching rack-2.2.2.gem
Fetching rack-test-1.1.0.gem
Fetching crass-1.0.6.gem
Fetching loofah-2.4.0.gem
Fetching rails-html-sanitizer-1.3.0.gem
Fetching rails-dom-testing-2.0.3.gem
Fetching builder-3.2.4.gem
Fetching erubi-1.9.0.gem
Fetching actionview-
Fetching actionpack-
Fetching activemodel-
Fetching activerecord-
Fetching globalid-0.4.2.gem
Fetching activejob-
Fetching websocket-extensions-0.1.4.gem
Fetching mini_mime-1.0.2.gem
Fetching mail-2.7.1.gem
Fetching actionmailer-
Fetching nio4r-2.5.2.gem
Fetching actioncable-
Fetching mimemagic-0.3.4.gem
Fetching websocket-driver-0.7.1.gem
Fetching marcel-0.3.3.gem
Fetching activestorage-
Fetching actionmailbox-
Fetching actiontext-
Fetching thor-1.0.1.gem
Fetching method_source-0.9.2.gem
Fetching railties-
Fetching sprockets-4.0.0.gem
Fetching sprockets-rails-3.2.1.gem
Fetching rails-
Successfully installed zeitwerk-2.3.0
Successfully installed activesupport-
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.


% sudo gem install rails -n /usr/local/bin
Successfully installed rack-2.2.2
Successfully installed rack-test-1.1.0
Successfully installed crass-1.0.6
Successfully installed loofah-2.4.0
Successfully installed rails-html-sanitizer-1.3.0
Successfully installed rails-dom-testing-2.0.3
Successfully installed builder-3.2.4
Successfully installed erubi-1.9.0
Successfully installed actionview-
Successfully installed actionpack-
Successfully installed activemodel-
Successfully installed activerecord-
Successfully installed globalid-0.4.2
Successfully installed activejob-
Successfully installed mini_mime-1.0.2
Successfully installed mail-2.7.1
Successfully installed actionmailer-
Building native extensions. This could take a while...
Successfully installed nio4r-2.5.2
Successfully installed websocket-extensions-0.1.4
Building native extensions. This could take a while...
Successfully installed websocket-driver-0.7.1
Successfully installed actioncable-
Successfully installed mimemagic-0.3.4
Successfully installed marcel-0.3.3
Successfully installed activestorage-
Successfully installed actionmailbox-
Successfully installed actiontext-
Successfully installed thor-1.0.1
Successfully installed method_source-0.9.2
Successfully installed railties-
Successfully installed sprockets-4.0.0
Successfully installed sprockets-rails-3.2.1
Successfully installed rails-
Parsing documentation for rack-2.2.2
Installing ri documentation for rack-2.2.2
Parsing documentation for rack-test-1.1.0
Installing ri documentation for rack-test-1.1.0
Parsing documentation for crass-1.0.6
Installing ri documentation for crass-1.0.6
Parsing documentation for loofah-2.4.0
Installing ri documentation for loofah-2.4.0
Parsing documentation for rails-html-sanitizer-1.3.0
Installing ri documentation for rails-html-sanitizer-1.3.0
Parsing documentation for rails-dom-testing-2.0.3
Installing ri documentation for rails-dom-testing-2.0.3
Parsing documentation for builder-3.2.4
Installing ri documentation for builder-3.2.4
Parsing documentation for erubi-1.9.0
Installing ri documentation for erubi-1.9.0
Parsing documentation for actionview-
Installing ri documentation for actionview-
Parsing documentation for actionpack-
Installing ri documentation for actionpack-
Parsing documentation for activemodel-
Installing ri documentation for activemodel-
Parsing documentation for activerecord-
Installing ri documentation for activerecord-
Parsing documentation for globalid-0.4.2
Installing ri documentation for globalid-0.4.2
Parsing documentation for activejob-
Installing ri documentation for activejob-
Parsing documentation for mini_mime-1.0.2
Installing ri documentation for mini_mime-1.0.2
Parsing documentation for mail-2.7.1
Installing ri documentation for mail-2.7.1
Parsing documentation for actionmailer-
Installing ri documentation for actionmailer-
Parsing documentation for nio4r-2.5.2
Installing ri documentation for nio4r-2.5.2
Parsing documentation for websocket-extensions-0.1.4
Installing ri documentation for websocket-extensions-0.1.4
Parsing documentation for websocket-driver-0.7.1
Installing ri documentation for websocket-driver-0.7.1
Parsing documentation for actioncable-
Installing ri documentation for actioncable-
Parsing documentation for mimemagic-0.3.4
Installing ri documentation for mimemagic-0.3.4
Parsing documentation for marcel-0.3.3
Installing ri documentation for marcel-0.3.3
Parsing documentation for activestorage-
Installing ri documentation for activestorage-
Parsing documentation for actionmailbox-
Installing ri documentation for actionmailbox-
Parsing documentation for actiontext-
Installing ri documentation for actiontext-
Parsing documentation for thor-1.0.1
Installing ri documentation for thor-1.0.1
Parsing documentation for method_source-0.9.2
Installing ri documentation for method_source-0.9.2
Parsing documentation for railties-
Installing ri documentation for railties-
Parsing documentation for sprockets-4.0.0
Installing ri documentation for sprockets-4.0.0
Parsing documentation for sprockets-rails-3.2.1
Installing ri documentation for sprockets-rails-3.2.1
Parsing documentation for rails-
Installing ri documentation for rails-
Done installing documentation for rack, rack-test, crass, loofah, rails-html-sanitizer, rails-dom-testing, builder, erubi, actionview, actionpack, activemodel, activerecord, globalid, activejob, mini_mime, mail, actionmailer, nio4r, websocket-extensions, websocket-driver, actioncable, mimemagic, marcel, activestorage, actionmailbox, actiontext, thor, method_source, railties, sprockets, sprockets-rails, rails after 37 seconds
32 gems installed

% rails -v

read more

rbenv update


% cd ~/.rbenv/plugins/ruby-build
% git pull
% rbenv install --list

read more


Testing handle creation speed...
9523 NullP sth/s perl 5.008006 darwin-thread-multi-2level (gcc 3.3 -Os) 0.000105s done
/usr/bin/make test -- OK
Running make install
Manifying blib/man1/dbiproxy.1
Warning: You do not have permissions to install into /usr/local/man/man1 at /System/Library/Perl/5.8.6/ExtUtils/ line 114.
mkdir /usr/local/man/man3: Permission denied at /System/Library/Perl/5.8.6/ExtUtils/ line 112
make: *** [pure_site_install] Error 255
/usr/bin/make install -- NOT OK


sudo cpan で行うとうまくいきます。

All tests successful, 1 test skipped.
Files=4, Tests=567, 23 wallclock secs ( 5.62 cusr + 12.00 csys = 17.62 CPU)
/usr/bin/make test -- OK
Running make install
Installing /System/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /System/Library/Perl/5.8.6/darwin-thread-multi-2level/
Installing /System/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DB_File/autosplit.ix
Installing /usr/share/man/man3/DB_File.3pm
Writing //System/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DB_File/.packlist
Appending installation info to //System/Library/Perl/5.8.6/darwin-thread-multi-2level/perllocal.pod
/usr/bin/make install -- OK

read more

Mac OSX Perl 5.8.8 インストール


tar xvzf perl-5.8.8.tar.gz
sudo chown -R $User:wheel perl-5.8.8
cd perl-5.8.8
sudo make install

/usr/bin/perl -v
/usr/local/bin/perl -v
mv /usr/bin/perl /usr/bin/perl_org
sudo mv /usr/bin/perl /usr/bin/perl_org
sudo ln -snf /usr/local/bin/perl /usr/bin/perl

perl -v
This is perl, v5.8.8 built for darwin-2level

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at, the Perl Home Page.

read more

Mac OSX でのPHP設定



LoadModule php4_module
AddModule mod_php4.c

sudo /usr/sbin/apachectl start

Configure Command
'/SourceCache/apache_mod_php/apache_mod_php-17/php/configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-apxs' '--with-ldap=/usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-mbregex' '--enable-dbx' '--enable-sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-path=/etc' '--sysconfdir=/private/etc'


read more

Recent entry


Tag Cloud

Page Top