$ rails -v
Rails 4.2.5.1
$ rails new sample
...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/<user>/local/rbenv/versions/2.1.5/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/<user>/local/rbenv/versions/2.1.5/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
extconf failed, exit code 1
Gem files will remain installed in /home/<user>/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.11 for inspection.
Results logged to /home/<user>/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-freebsd-9/2.1.0-static/sqlite3-1.3.11/gem_make.out
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
run bundle exec spring binstub --all
$ mkdir -p ~/local/src/libexecinfo
$ cd ~/local/src/libexecinfo
$ wget http://pkg.freebsd.org/freebsd:11:x86:32/latest/All/libexecinfo-1.1_3.txz
$ tar xvzf libexecinfo-1.1_3.txz
x +COMPACT_MANIFEST
x +MANIFEST
tar: Removing leading '/' from member names
x usr/local/include/execinfo.h
x usr/local/lib/libexecinfo.a
x usr/local/lib/libexecinfo.so
x usr/local/lib/libexecinfo.so.1
x usr/local/share/doc/libexecinfo/README
# Default directory where compressed snapshots are stored.WORKDIR=/home/<user name>/local/var/db/portsnap
# Default location of the ports tree (target for "update" and "extract").PORTSDIR=/home/<user name>/local/work/ports
# Server or server pool from which to fetch updates. You can change# this to point at a specific server if you want, but in most cases# using a "nearby" server won't provide a measurable improvement in# performance.SERVERNAME=portsnap.FreeBSD.org
# Trusted keyprint. Changing this is a Bad Idea unless you've received# a PGP-signed email from <security-officer@FreeBSD.org> telling you to# change it and explaining why.KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3aede40c98633216c330
# Example of ignoring parts of the ports tree. If you know that you# absolutely will not need certain parts of the tree, this will save# some bandwidth and disk space. See the manual page for more details.## WARNING: Working with an incomplete ports tree is not supported and# can cause problems due to missing dependencies. If you have REFUSE# directives and experience problems, remove them and update your tree# before asking for help on the mailing lists.#REFUSE arabic chinese french german hebrew hungarian
REFUSE korean polish portuguese russian ukrainian vietnamese
REFUSE x11 x11-clocks x11-drivers x11-fm x11-fonts x11-servers x11-themes x11-toolkits x11-wm
REFUSE palm cad astro
export PATH=${PATH}:${HOME}/local/ports/bin
export NODE_PATH=${HOME}/local/ports/bin/node
export NODE_MODULES=${HOME}/local/lib/node_modules
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HOME}/local/lib
export INSTALL_AS_USER=yes
export PREFIX=${HOME}/local/ports
export LOCALBASE=${HOME}/local/ports
export PKG_DBDIR=${LOCALBASE}/var/db/pkg
export PKG_TMPDIR=${LOCALBASE}/tmp/
export PORT_DBDIR=${LOCALBASE}/var/db/pkg
export DISTDIR=${LOCALBASE}/tmp/dist
export WRKDIRPREFIX=${LOCALBASE}/tmp/work
export PORTSDIR=${HOME}/local/work/ports
export PKGTOOLS_CONF=${LOCALBASE}/etc/pkgtools.conf
export DEPENDS_TARGET='install clean'export X11BASE=${LOCALBASE}export PKG_CONFIG_PATH="$HOME/local/ports/lib/pkgconfig:$HOME/local/ports/libdata/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig:/usr/libdata/pkgconfig"# Set user and group variables to ourselfexport BINOWN=`whoami`export BINGRP=`id -G -n ${BINOWN}`export SHAREOWN=${BINOWN}export SHAREGRP=${BINGRP}export MANOWN=${BINOWN}export MANGRP=${BINGRP}# Make sure files are installed with correct default permissionsexport BINMODE=744
export SHAREMODE=644
export MANMODE=644
# Make sure we don't really try to become root, but just execute everything as ourselvesexport SU_CMD="sh -c"# Make sure the systemdefault make.conf is not readexport __MAKE_CONF=${LOCALBASE}/etc/make.conf
# Keep our own version of ldconfig hintsexport LDCONFIG="/sbin/ldconfig -i -f ${LOCALBASE}/var/run/ld-elf.so.hints"export LD_LIBRARY_PATH=${LOCALBASE}/lib
export LD_RUN_PATH=${LOCALBASE}/lib
export PATH=${LOCALBASE}/bin:${LOCALBASE}/sbin:${PATH}export MANPATH_MAP=${LOCALBASE}/bin:${LOCALBASE}/man
# Set application specific variables to make sure it doesn't pick up things from the main systemexport APXS=${LOCALBASE}/sbin/apxs
export PERL=${LOCALBASE}/bin/perl
export PERL5=${PERL}export SITE_PERL=${LOCALBASE}/lib/perl5/site_perl/5.8.8
export SITE_PERL5=${SITE_PERL}export PERL_VERSION=5.8.8
export PERL_VER=${PERL_VERSION}export SRCCONF=~/local/ports/etc/src.conf
---deps/v8/src/base/platform/platform-freebsd.cc.default2016-02-1300:45:50.000000000+0900+++deps/v8/src/base/platform/platform-freebsd.cc2016-02-1300:47:14.000000000+0900@@-122,10+122,10@@std::vector<OS::SharedLibraryAddress>OS::GetSharedLibraryAddresses(){-std::vector<SharedLibraryAddress>result;+std::vector<SharedLibraryAddress>address_result;staticconstintMAP_LENGTH=1024;intfd=open("/proc/self/maps",O_RDONLY);-if(fd<0)returnresult;+if(fd<0)returnaddress_result;while(true){charaddr_buffer[11];addr_buffer[0]='0';@@-156,10+156,10@@// There may be no filename in this line. Skip to next.if(start_of_path==NULL)continue;buffer[bytes_read]=0;-result.push_back(SharedLibraryAddress(start_of_path,start,end));+address_result.push_back(SharedLibraryAddress(start_of_path,start,end));}close(fd);-returnresult;+returnaddress_result;}