Help us understand the problem. What is going on with this article?

UbuntuにRuby on Rails4.2

More than 3 years have passed since last update.

Gitインストール

各種パッケージインストール

curl g++ zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev
sqlite3 libsqlite3-dev nodejs

rbenvインストール

git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

ruby-buildインストール

mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git

アップデートは、ruby-buildでgit pullしてsudo ./install.sh

rubyインストール

rbenv install 2.3.0
rbenv global 2.3.0

最新rbenv install -l | grep -v -で確認

設定確認

rbenv versionでバージョン
'which ruby'でパス
/home/"自分のフォルダ"/.rbenv/shims/ruby
'ruby -v`

.gemrc作成

~/.gemrc
install: --no-ri --no-rdoc
update: --no-ri --no-rdoc

Ruby on Rails 4.2インストール

gem install rails --version="~> 4.2"
rbenv rehash

作業フォルダ作成

適当なフォルダ。以降、workということで

動作確認アプリ作成

作業フォルダworkで作業。
アプリケーションはfooということで

rails new foo --skip-bundle

フォルダfooで作業

依存パッケージインストール

bundle install

ユーザー管理機能作成

rails g scaffold user name:string email:string
rake db:migrate

アプリケーション起動

rails s

動作確認

http://localhost:3000/users

kawazut
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした