Brief introduction
The Ruby on Rails framework has been widely watched since its inception and, guided by ideas like "Don't repeat Yourself" and "contract is superior to configuration", rails gives Web developers a very high level of development efficiency. ActiveRecord's flexibility allows you to use a very easy-to-use Hibernate without cumbersome configuration
Tar.jar, which is in the jars directory.
Access shared libraries
RJB uses the Java Native Interface (JNI) to implement its functionality. Therefore, it needs to access some of the shared object files (shared libraries) that are included with the JDK installation. You must add the location of these files to the LD_LIBRARY_PATH environment variable by using the following command:
[root@san]# export java_home=/usr/local/jdk60
[root@san]# export ld_library_path= $
How to Improve Ruby On Rails Performance
1 Introduction to Introduction
It is always said that Rails is so slow that it has become a common issue in the Ruby and Rails communities. However, this statement is not true. As long as you use
Explore some methods to optimize Ruby on Rails performance, rubyrails
1. There are two reasons for slowing down your Rails application:
Ruby and Rails should not be used as the preferred choice. (I used Ruby and
).2. Association of Rails. The most convenient 1-to-1, 1-to-many, many-to-many magic for wrap objects. Many other languages should not have this concept. There is an official document on Rails that is highly recommended for in-depth understanding. It is also one of the most commonly used magic to see.3. Some jobs in Rails
The production and Running Environments recommended by Ruby on Rails are Linux/FreeBSD/Unix, that is, UNIX operating systems. They use Lighttpd + fcgi solutions. I will take the Linux operating system, Lighttpd + fcgi, MySQL database as an example, from
Source code Compilation and installation start. Before installation, ensure that the GCC compiler has been installed in the Linux operating system. Otherwi
This article focuses on the deployment of Ruby on Rails in Docker, Docker is the hottest virtual machine in the present, and the Ruby on Rails deployment described in this article takes advantage of the cool, automated approach of rake in Ruby, Need friends can refer to the
"
Converting images
Perhaps one of your most common jobs is to convert images into different formats. Minimagick can simplify this process:
Image.format "PNG"
image.write "Public/uploads/test.png"
You can also put multiple operations in the same module:
Image.combine_options do |i|
I.resize "2048x1536"
i.flip
i.rotate " -45" I.blur "
0x15"
end
image.write "public/uploads/" Blur.png "
![ Some Weird result] (blur.png
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.