In this lesson we explain how bundles are built and how gemfile are used. Before we were just two words of code, this lesson we further to explain:What's the matter, bundler?is a management tool for managing gem-dependent packages in a rails application. It automatically downloads and installs the corresponding gem suite based on the settings in Gemfile and helps us to resolve dependencies between different
Service Redis Start
2, Ruby (remember to download well, tar a backup, download thief slow)
Curl--progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p353.tar.gz | Tar XZ
CD ruby-2.0.0-p353
./configure--prefix=/usr/local/
Make make install
3, check Ruby is installed successfully, and configure $path
which Ruby
/usr/local/bin/ruby
Ruby-v
Ruby 2.0.0p353 (2013-11-22 revision 43784) [X86_64-linux]
4, Bundle
Gem Install bundler--no-ri--n
Last Login:sat Oct 23:30:24 on ttys002sivek_lindemacbook-pro:~ sivek_lin$ sudo gem update--systemPassword:Latest version currently installed. Aborting.sivek_lindemacbook-pro:~ sivek_lin$ $gem sources-l-bash:sources:command not foundsivek_lindemacbook-pro:~ sivek_lin$ Gem sources-lCurrent SOURCES * * *https://ruby.taobao.org/sivek_lindemacbook-pro:~ sivek_lin$ $su
server is now ready to accept connections on port 6379
OK, the above redis server is complete
3. Client usage
This section describes how to use rails.
Gem
Redis-Rb (https://github.com/redis/redis-rb)
require "redis"redis = Redis.newredis.set("mykey", "hello world")# => "OK"redis.get("mykey")# => "hello world"
OK, simple Client Version
4. troubleshoot
Prompt
Redis::ProtocolError ( Got 'H' as initial reply byte. If you're in a forking enviro
Label:1. Defining sets on a derived context1) Dbset Property: Specifies that the collection is of type entity2) Idbset Property3) Read-only Set propertyPublic idbset2. Find entities with primary keysThe Find method of Dbset, if the entity is not found in the context with the primary key, it is queried in the database.1) Find entities by primary keyvar unicorn=context. Unicorns.find (3);//Querying the databasevar unicornagain=context. Unicorns.find (3)
When installing jekyll on mac osx 10.7, I want to write a blog on github, you need to install jekyll. I installed it according to this document. http://jekyllrb.com/docs/home/ mac osx 10.7 has built-in ruby and gem. You can use $ sudo gem update -- system to get the next update and then $ sudo gem. when running this command, install jekyll reports an error refere
The customer's server is Ubuntu + apache2 + ruby on rails. Currently, some pages on the customer's server always report the 500 error. The ruby language is only known and has not been studied in depth. I have never set up a ruby server environment, and it is strange that the customer uses ubuntu as the server. After installing ruby on rails on CentOS, I understand.Preface: problems after yum is installed.At the beginning, I used yum to install apache mysql ruby on rails and so on. After
execute setup. Rb in the directory. After the installation is complete, run the following command to check:
Gem-V
3. Install rails
A) Remote Installation: Gem install rails-remote
The following is a description from the Internet that I didn't use this method for installation, because my network speed is too slow.
Then the output is automatically:Install required dependency activerecord?Install requi
Today, the system is reinstalled and the running environment of rails is re-built. Therefore, the following commands are based on the latest situation. Install Ruby one-click Installer
Note: Try not to install those new versions. Ruby and rails are not very friendly to Windows. Generally, the mswin32 versions of these class libraries are the latest. Trade rashly acts as a mouse, So you suffer. The version I installed is 1.8.6-25.
Then, add c: \ Ruby \ bin to the system variables to install Ru
will help you configure git and SSH, the installation process of a series of environment variables such as Ruby also configured OK, very good ~ Figure 1-4 Testing Ruby Installation after installing the Railsinstaller-2.2.4.exe, open the cmd command line and enter the command: RUBY–V, if, in the case of Ruby, shown in Figure 1-4, Ruby is already installed, we can also enter a command to test the version of the gem:
Many documents describe how to use the gem (one-click Ruby installer is already included, and you can use the gem after installation) for Remote Installation. If the network is poor, the installation will fail. I can see an article on the Internet that describes the local installation method. Now I will summarize the installation process for you.
First download them from rubyforge.net (the version may be u
Http://www.cnzzad.com/tut/69566.html
Recommended:Start Network-Professional hosting and server sharing provider 17hz.net-5-year server shared rental boutique Service
From: http://developer.51cto.com/art/200908/147276.htm
It is difficult to install Ruby on Rails, but it is also very convenient. Development of applications based on RubyProgramYou must install Ruby, Gem, rails, and mongrel.
How to install Ruby on Rails
First, downl
Web Automation testing has always been a more pressing problem.Figure 1-1 Tools required for installationhttp://railsinstaller.org/because installing Ruby also requires a few other development tools, it is recommended to download it from the website http://railsinstaller.org/, and it will help you set the environment variables as well, using the installation package. The version I am using is: Railsinstaller-2.2.4.exe, it is recommended to download the latest version.Start installing the Railsin
Run the installation package and unzip it to a folder, such as C:\DevKit
The Config.yml file is created by initialization. In the Command Line window, enter the following command:
CD "C:\DevKit"Ruby DK.RB InitNotepad config.yml
In the Notepad window that opens, add a new line at the end - C:\Ruby200-x64 , save the file, and exit.
Back in the Command Line window, review (not required) and install.
Ruby DK.RB ReviewRuby Dk.rb Install
and modify the PATH environment variable. This method takes effect only after the system is restarted.
It can be set:
PATH =. :/bin:/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/ruby/bin: /usr/local/mysql/bin
4. install some libraries required for redmine running with gem
Gem install rails
{Optional
Gem update -- system
Here we will mainly sort out how to install Rails in Windows. Rails supports multiple operating systems, such as Windows and Linux. Here we will introduce several installation methods based on the Windows development environment.
1. You can download an all-in-one rails running environment with language support, editing environment, database, and server: Instant Rails. This installation method is very simple. You can directly run the tool without any configuration.
2. you can specify an address t
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.