Skip to content

Instantly share code, notes, and snippets.

View horaotoko's full-sized avatar

Masaya Nakazato horaotoko

View GitHub Profile
@horaotoko
horaotoko / test.md
Created July 22, 2020 08:37
markdown test

hi

test
We couldn’t find that file to show.
% bundle
Fetching gem metadata from https://rubygems.org/........
Using rake 12.3.1
Using concurrent-ruby 1.1.3
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.11
% bundle                
Fetching gem metadata from https://rubygems.org/........
Using rake 12.3.1
Using concurrent-ruby 1.1.3
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.11
@horaotoko
horaotoko / gist:500ddbd63f55a71f2208
Last active August 29, 2015 14:07
brewでインストールしたrbenvのアップデート方法
% brew update
% brew upgrade rbenv ruby-build

または

% rm -rf ~/.rbenv/plugins/ruby-build
@horaotoko
horaotoko / mysqlのインストールでつまったところ
Last active December 20, 2015 13:09
mysqlのインストールでつまったところ
before brew update
$ brew install imagemagick mysql qt
Error: You must `brew link libtool' before imagemagick can be installed
Error: mysql-5.5.27 already installed
To install this version, first `brew unlink mysql'
Error: qt-4.8.4 already installed
$ brew link libtool
Linking /usr/local/Cellar/libtool/2.4.2... 17 symlinks created
@horaotoko
horaotoko / gist:3857368
Created October 9, 2012 08:33
子ページ取得
<?php
$page_id = mysql_real_escape_string( $post -> ID );
$array = $wpdb -> get_results( "SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_parent = '$page_id' AND post_status = 'publish'" );
foreach ( $array as $value ) {
echo '<h2><a href="' . get_permalink( $value -> ID ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), esc_attr( strip_tags( $value -> post_title ) ) ) . '" rel="bookmark">' . esc_attr( strip_tags( $value -> post_title ) ) . '</a></h2>' . "\n";
echo apply_filters( 'the_content', $value -> post_content );
}
?>
Installing mysql2 (0.3.11) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/nakazatomasaya/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
bundle install --binstubsをすると
Installing json (1.7.5)
Errno::EPERM: Operation not permitted - /Users/nakazatomasaya/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5/.gitignore
An error occurred while installing json (1.7.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.5'` succeeds before bundling.
jsonの部分でエラーが出る。なので
gem install json -v '1.7.5'をすると