Installing Ruby on Rails on Ubuntu Dapper or Edgy Cài đặt Ruby on Rails trên Ubuntu Dapper hoặc edgy
Ruby on Rails is a popular new framework for developing web applications. Ruby on Rails là một khuôn khổ mới phổ biến cho phát triển ứng dụng web. Since Ruby on Rails includes a built-in web server for development purposes, there is no need to install a separate web server. Từ trên bản đồ bao gồm một máy chủ được xây dựng trong web cho mục đích phát triển, không cần phải cài đặt một máy chủ web riêng.
First you will want to make sure that you've Trước tiên, bạn sẽ muốn đảm bảo rằng bạn đã enabled the universe repository. cho phép các kho vũ trụ.
Open up a terminal window, and type in the following commands: Mở ra một cửa sổ thiết bị đầu cuối, và gõ các lệnh sau đây:
sudo apt-get install ruby ri rdoc sudo apt-get install ruby ri rdoc
sudo wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz sudo wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
tar -xvzf rubygems-0.9.0.tgz tar-xvzf rubygems-0.9.0.tgz
cd rubygems-0.9.0 cd rubygems-0.9.0
sudo ruby setup.rb sudo ruby setup.rb
sudo gem install rails –include-dependencies sudo đá quý cài đặt ray-bao gồm-phụ thuộc
To test out the installation, you can create a test rails project: Để kiểm tra xem việc cài đặt, bạn có thể tạo một thử nghiệm ray dự án:
$ rails testapp $ Ray testapp
This will create a test application. Điều này sẽ tạo ra một ứng dụng thử nghiệm. Change directory into that directory and launch the Ruby on Rails development server (WEBrick) Thay đổi thư mục vào thư mục đó và khởi chạy máy chủ phát triển Ruby on Rails (WEBrick)
$ ./script/server $ / Script. / Máy chủ
Example: Ví dụ:
/testapp$ ./script/server / testapp $ / script. / máy chủ
=> Booting WEBrick… => Khởi động WEBrick ...
=> Rails application started on => Rails ứng dụng bắt đầu vào http://0.0.0.0:3000 http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with –help for options => Ctrl-C để shutdown máy chủ; gọi với-giúp cho các tùy chọn
[2006-12-07 05:28:37] INFO WEBrick 1.3.1 [2006-12-07 05:28:37] INFO WEBrick 1.3.1
[2006-12-07 05:28:37] INFO ruby 1.8.4 (2005-12-24) [i486-linux] [2006-12-07 05:28:37] INFO ruby 1.8.4 (2005-12-24) [i486-linux]
[2006-12-07 05:28:37] INFO WEBrick::HTTPServer#start: pid=6687 port=3000 [2006-12-07 05:28:37] INFO WEBrick:: HTTPServer # bắt đầu: pid = 6.687 cổng = 3000
You'll notice that the server is listening on port 3000. Bạn sẽ nhận thấy rằng các máy chủ là lắng nghe trên cổng 3000. Open up a browser, and go to Mở ra một trình duyệt, và đi đến http://localhost:3000 http://localhost:3000


Daily Email Updates Email cập nhật hàng ngày
You can get our how-to articles in your inbox each day for free. Bạn có thể làm thế nào chúng tôi vào các bài viết trong hộp thư của bạn mỗi ngày miễn phí. Just enter your name and email below: Chỉ cần nhập tên và email của bạn dưới đây:



You should always install the latest version of Bạn luôn luôn phải cài đặt phiên bản mới nhất của Gems Đá quý (currently 1.0.1). (hiện tại là 1.0.1).
Thanks, It helped. Thanks, It giúp.