ruby script/server
이렇게 하면 WEBrick이 실행되고 예제를 따라했어야 했는데 실행되지 않고 아래와 같은 에러메시지가 떨어졌습니다.
outsider@outsider-laptop:~/Sources/Ruby on Rails/demo$ ruby script/server
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:269:in `require_frameworks': no such file to load -- net/https (RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:134:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
from /home/outsider/Sources/Ruby on Rails/demo/config/environment.rb:9
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3
자세한 에러메시지를 모르겠지만 `require_frameworks': no such file to load라는 메시자를 뿌리면서 WEBrick 실행에 실패했습니다.
관련 정보를 찾아보니 위의 에러는 OpelSSL 라이브러리가 없어서 나타난 에러라고 합니다.
sudo apt-get install libopenssl-ruby
apt-get 명령어로 OpenSSL 라이브러리를 설치합니다.(환경은 우분투 9.04입니다.)
이제 WEBrick을 실행하면 기본포트인 3000포트로 실행이 잘 됩니다.
Comments