4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

sinatraの導入

Last updated at Posted at 2013-04-21

アプリケーション名のディレクトリを作り,
その中にGemfileを作成.

Gemfile
source 'https://rubygems.org'

gem 'sinatra'
gem 'passenger'

group :development do
 gem 'sinatra-contrib'
end

bundle install

config.ruを作成

config.ru
require 'rubygems'
require 'sinatra'
require './[app_name].rb'

run Sinatra::Application
[app_name].rb
get '/' do
 'Sinatra Sample.'
end

public,tmpディレクトリを作成し,シンボリックリンクをはる
ln -s [app_name]/public /var/www/html/[app_name]

/etc/hhtpd/conf.d/passenger.confRackBaseURI /[app_name]を追加

service httpd restartで実行

参考URL
SinatraによるWebアプリケーション開発入門
ざくにく定食:【Ubuntu】さくらのVPSでSinatraを動かす

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?