discovery must verify first_name, last_name, automatically call name= method?) )3. You can then use different combinations of first and last names by @user. Name.xxx .Analysis: First look at three pictures:Figure 2Figure 3:@user. Name's internal operating mechanism:The first is a judgment:if @user. first_name Nameofperson::P ersonname.new (@user. first_name, @user. last_name) EndIf first_name exists, a new PersonName object is added, calling the Initialize method def Initialize (first, l
Write one of the simplest examples
1. Build the following folder
Note: The Lib directory must have a RB file that is the same as your gem name.
Copy Code code as follows:
$ CD Hola
$ tree
.
├──hola.gemspec
└──lib
└──hola.rb
2. Write Code
. Hola.rb
% Cat lib/hola.rb
class Hola
def self.hi
puts "Hello world!"
End End
. hola.gemspec
% cat Hola.gemspec
To give you illustrator software users to detailed analysis to share the design long drag shadow gem icon effect of the production tutorial.
Tutorial Sharing:
I. Drawing of Diamonds
In my eyes, painting is a very interesting thing, it is to restore our lives on the basis of the addition of our imagination of the world (if you have enough imagination). So imagine the diamond you've seen before. What shape is it? Is it shine
Common Ruby Package Manager gem commands and common rubygem commands
Gem-related commands
1. display the help and version of gemCopy codeThe Code is as follows:Gem-h/-- help# Display the help of gem
Gem-v/-- version# Display the gem version number2. List all available softwa
Ruby language upgrades are still more diligent. But a large number of versions make library compatibility a big problem. Some gems indicate that Ruby is explicitly unsupported by a particular version, while some gems are incompatible with a higher version. In addition, the gem itself has a version, it is simply chaos into a porridge. Even with ruby versioning tools such as RVM and rbenv, you can't avoid fal
Create your own gem and upload it to githubCreate your own gem and upload it to the github environment: centos7, git version 1.8.3.11. Create gem1 to install bundler# Gem install bundler2. Use bundler to create the framework required for gem# Bundler gem file_manipulate3. Mo
Environment: OSX EI 10.11.1After switching to the gem source yesterday, there was no problem with the pod installation, or it could be used$ gem Sources--add https://ruby.taobao.org/--remove https://rubygems.org/$ sudo gem install CocoapodsToday when the use of the time, under a project to execute pod install half a day or so no response, but the CTRL + C forced
After installing Ror, you plan to run a demo.
Question 1,
$ Ruby script/Server
Rails requires rubygems> = 1.3.1 (You have 1.2.0). Please 'gem update -- system' and try again.
Question 2,
Execute as prompted:$ Sudo gem update -- SystemBut it prompts that the usage of -- system has been disabled:Error: While executing gem... (runtimeerror)
The following error is always reported when you install the gem.
WARNING: RubyGems 1.2 + index not found:
RubyGems will revert to legacy indexes degrading performance.
Or the gem install is too slow or cannot be connected to timeout.
You can install gem locally.
First go to the gem official website http://rubygems.org/
Tag:bloghttpiofor Issues ctinewsql rails new demo--database=mysql last error Gem files would remain installed in d:/billfiles/rails_dev/ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.15 for Inspection. Results logged to D:/BILLFILES/RAILS_DEV/RUBY193/LIB/RUBY/GEMS/1.9.1/EXTENSIONS/X86-MINGW32/1.9.1/ Mysql2-0.3.15/gem_make.out An error occurred while installing MYSQL2 (0.3.15), and bundler cannot continue. Ma
SlaveRailsUpgrade to GEM uninstall and gem cleanupRecentRailsUpgrade from 1.1.6 to 1.2.1. If rails1.1.6 has been installed, how can this problem be solved?
1. Upgrade to 1.2.1 and retain 1.1.6If you do not want to delete the previous version, first download the local installation package rails1.2.1Http://bbs.railschina.com/thread-54-1-1.htmlRun the gem install y
Create your own gem and upload it to GitHubEnvironment: Centos7,git version 1.8.3.1Create a GEM1 installation bundler#gem Install Bundler2 frames required to create a gem using bundler#bundler Gem File_manipulate3 Modify File_manipulate.gemspec File#vim File_manipulate.gemspec(The description and summary are mostly mod
Guaranteed Ruby and Gem without problemsRubyinstaller-1.9.2-p180.exe two radio boxes are selected when the installation is installed with an administrator openC:\Documents and Settings\administrator>rubyRuby 1.9.2p180 (2011-02-18) [i386-mingw32]ruby-vUpdate Rubygem gem Update--systemC:\Documents and Settings\administrator>gem-v1.5.2Gem Install/list/uninstall sele
Soul gem bzoj 2663, bzoj2663
Soul gem (1 s 128 MB) soulgem
[Problem description]
"As the soul of your body, in order to better use magic, you have been given a small and safe shape ······"
We know that the life of a magic girl is stored in a device called Soul Gem. Sometimes, when the soul gem is far away from the body
May be the cause of the national firewall package, the installation of Railsinstaller after the execution always error,
Bundle InstallDL is deprecated, fiddleFetching gem metadata from https://rubygems.org/.....Resolving dependencies ...
Gem::remotefetcher::fetcherror:ssl_connect returned=1 errno=0 State=sslv3 ReadServer certificate b:certificate verify failed (https://rubygems.org/gems/rake-1
After installing ruby1.9.2p290 and rubygem1.8.10 using the source code in buntu10.10 today, you want to use gem to install rails: Gem install rails. The result shows no such file to load -- zlib error.
Zlib is a library implementing the deflate compression method foundIn gzip and PKZIP.
Work und, install zlib1g and the zlib1g-dev package (APT-Get install or use synaptic), and then
1. Go back to the ruby
Troubleshoot the Rails bundle install MySQL gem package
Environment
Ubuntu 12.04ruby-2.1.1
First create a new project that executes bundle on the project install
Tips
Copy Code code as follows:
...
Make sure that
Gem install mysql2-v ' 0.3.16 '; Succeeds before bundling
....
It's very strange.
Last console hint
Copy Code co
Upgrade to the latest Mac OS Mavericks. There was an error loading JSON:
Copy Code code as follows:
Gem install json-v ' 1.8.1 '
Building native extensions. This is could take a while ...Error:error Installing JSON:Error:failed to build gem native extension.
/usr/local/var/rbenv/versions/2.0.0-p247/bin/ruby extconf.rbCreating Makefile
Make "des
Speaking of Gem TD, can be traced back to my sophomore that will, counted to be 2005 years.So-called a TD-Class Warcraft RPG, Gem TD can be considered to reach the peak of the TD Maze, three-in-three out is the ingenuity.This maze designer was done in Jiaozuo last year, only completed the maze design function, here gives 11 platform on a popular maze.In order to be able to share the good maze, save, the sof
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.