Build a Rail development environment and install RMagic in Ubuntu

Source: Internet
Author: User
Ubuntu is also a Linux system. Fortunately, I have been used to the command line method for mac systems, and various things are still quite handy. Of course I am only able to install the Rails environment, from yesterday's Ubuntu to now, there have been a total of six systems, poor, good, but now it's done. Install Rails ------------------------------------------------- sudoapt-getinstallbuild-es

Ubuntu is also a Linux system. Fortunately, I have been used to the command line method for mac systems, and various things are still quite handy. Of course I am only able to install the Rails environment, from yesterday's good Ubuntu to now, there have been a total of six systems, poor ah, well, now it's done ,,

Install Rails

-------------------------------------------

Sudo apt-get install build-essential gcc g ++ libssl0.9.8 libssl0.9.8-dbg libssl-dev build-essential

Sudo apt-get install ruby

Sudo apt-get install rubygems

Sudo gem update -- system

Sudo gem install Rails, feeling good)

Sudo gem install mongrel

Sudo apt-get install libgd-ruby1.8 libyaml-ruby libzlib-ruby

Sudo apt-get install imagemagick

Sudo apt-get install libmagick9-dev ruby1.8-dev (errors will be reported here, don't worry)

Sudo gem install RMagick (there will be an error prompt at the end, no matter)

After installation, you can view the gem list in the GEM list,

Ruby-v

I checked the Rails-v version and told others that Rails-v was invalid. I didn't use it yesterday. I had to settle it again today. The reason is unknown. I did not try to write it online.

RMagick is the most important thing. I am miserable in the MAC system. http://ubuntuone.cn/installed for a day, and ubuntu.com is used to give it to the user. Although there is an error, it can still be used.

You can write a ruby file for testing.

Require 'rubygems'

Require 'rmagick'

Img = Magick: Image. new (200,200, Magick: HatchFill. new ('green', 'green '))

Gc = Magick: Draw. new

Gc. stroke ('transparent ')

Gc. pointsize (24)

Gc. font ("fonts/STCAIYUN. TTF ")

Gc. text (20, 40, 'I am doing test ')

Gc. draw (img)

Img.write('test.jpg ')

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.