Cause:
I often need to check the status of some Windows Services. Every time I use the control panel> Service to view the Service status, it is not only a waste of time but also boring. Simply write a Ruby script. Let the Ruby script notify me of the status of a Windows Service and give me some prompts Based on the status.
Main content:
You can see the use of the following technologies/tools in this article daily works with ruby.
Use RubyGems to query and install the
Watir (based on Ruby) and watirruby
Web automation testing has always been an urgent issue.
Figure 1-1 tools to be installed
Http://railsinstaller.org/
Because installing Ruby also requires some other development toolsets, it is recommended to http://railsinstaller.org from the website/Download, and use the installation package, it will help you set the environment variables, I use the version is: railsinstaller-2.2.4.exe, it is recommended to download the latest version.
Start installing the
install curl$ sudo apt-get install Git-coreConfigure GitGit is used in RVM scripts, and we use it in the second part of this tutorial. After installation, we need to take a moment to configure it. Configuration is easy: Just provide a user name and email address.$ git config--global user.name "Your name" $ git config--global user.email [email protected]Such as:$ git config--global user.name "John Doe" $ git config--global user.email [email protected]Installing RVMNow we can install the RVM. RVM
time the installation of the E:\Program Files\bla bla ... In such a directory, the following installation of rails will appear similarto the "'E:program is not an internal or external command such errors, and later found that there may be folders in the directory there are spaces can not identify." Finally installed directly in the root directory is good ~
Enter Ruby-v at the end of the command line to test:
hoho~~ Installation S
and modification are unsuccessful;
Half-time: It seems that writing test code is time-consuming. In actual testing, deployment, and subsequent expansion, the test code will save more time.
Environment Construction
The test environment used by the author is a popular and common framework: RSpec + Factory Girl, and autotest automatic tools. RSpec is a descriptive language. It is very easy to get started and easy to understand through feasible examples. Factory Girl can help construct test data
Bundle Introduction:
The bundle is introduced in Rails 3 to manage all gem dependencies in the project, which can only be executed in a directory containing gemfile, such as the root of a rails 3 project.
About Gemfile and Gemfile.lock
The trust packs for all Ruby projects are configured in Gemfile and are no longer found by require as they were before. In Rails 3, if you need to require a gem package, you
This is an unforgettable and rewarding night, and the best guests from all over the world have come to the "on the Road" café in order to have the opportunity to interact with 20 of thousands of technical experts from canonical, Csip and defense hkust, including Seb, Lain, Didier, Willaim Hua. Soon the café was packed. At the beginning of the meeting, the beauty of Kirin was first introduced in English, and the guests were warmly shouted and applauded to participate in the event. Next, we have t
: Seemingly write test code is time-consuming, in fact, in testing, deployment and subsequent extensions, the test code will save more time.
Environment construction
The author adopts the test environment is more popular general framework: RSpec + Factory Girl, and autotest automatic tool. RSpec is a descriptive language, which is easy to understand by describing system behavior in a workable example. Factory Girl can help to construct test data, eliminating the trouble of writing fixture.
The recent use of cocoa Pods prompt version is too low need to upgrade to normal use.
However, there are also problems during the upgrade process.
First of all I was directly using the statement: sudo gem install cocoapods update upgrade, did not expect to complain again.
Then I wondered if it was because I didn't update the gem, so I updated the gem first.
Not
1. Dynamic planningThe following text description sources for dynamic planning
Knapsack Problem of Dynamic planning (I.)HawsteinSource: http://hawstein.com/posts/dp-knapsack.html
Everything has to be said from a story.A man went to the forest to play and found a bunch of gems, he counted, there were n. But the only thing he can pack is a backpack with a capacity of C. The man lined up n jewels in a row and numbered: 0,1,2,..., n-1. The volume and value of the first
After running the bundle install for the first time, the Gemfile.lock file is generated, which records the specific version number of the gem, and according to the official documentation, running the bundle install will no longer be based on the gemfile, but install the gem according to the lock file. , so that the version installed in the new machine is different from the lock, causing the
Ignorant like me, but only last year to know that there is a "serial treasure" such a game, and it seems that each lottery hall has dozens of consoles for people "entertainment." Last year and a few friends passed the lottery to see the hall in the play "Serial treasure" people seem to be quite a lot of, dozens of games consoles are basically not enough. Play also baise, whether it is a suit of middle-aged comrades, or dress up ordinary ordinary people, have fun ... To be honest, I can't underst
://*/northwind.ssdl|RES://*/NORTHWIND.MSL;Provider=system.data.sqlclient;Provider Connection string=quot; Data source=.\sqlexpress;Initial Catalog=northwind;Integrated security=true;multipleactiveresultsets=truequot; "providername="System.Data.EntityClient" />public class Northwindcontext : DbContext{public Northwindcontext (): base("Name=northwind_entities"){}}5. Defining sets on a derived context
1) Dbset property: Specifies that the collection is of type entity
2) Idb
The goal of mastering Redmine plugin development was not realized in 2016 years, and continued in 2017. Choose the Ruby on Rails Tutorial tutorial, Windows installs Railsinstaller, which is Ruby V2.1.8, and Bitnami redmine-3.3.0 version is the same. But the rails version is 4.2.5.1, and the redmine corresponds to the 4.2.6 inconsistency. Make a Gem pack update first:
Start the terminal. Note Use the Railsinstall installed after the terminal,
Cocoapods configuration, cocoapodsIi. CocoaPods Installation
CocoaPods can be conveniently installed through RubyGems of Mac.
Open Terminal (the Terminal that comes with the Mac computer ):
(1). Set the ruby software source
This is because ruby's software source rubygems.org was blocked by tianchao because of Amazon's cloud services. I need to update the ruby source as follows:
1234567
gem sources -l# (View the current ruby source)
and their corresponding gem packages ." Run the following command to install the script. Rvm will be installed in the home directory of your current login user.··· · 50 ······· · 90
1.
$
bash
install
/rvm)
Switch to the main directory and modify the user's bash settings file to ensure that the rvm script is loaded every time the user logs on. We use nano to edit the bash settings file. Nano is a simple command line text editor, which will be used l
useful packages for Ruby or rails, you can browse the Ruby Toolbox and it's easy to sort by the suite's popularity.Common directivesgem -v 告訴你 RubyGems 的版本gem update --system 升級RubyGems的版本gem install gem_name 安裝某個套件gem list 列出安裝的套件gem update gem_name 更新最新版本gem update 更新所有你安
Magic Gem House system development, Magic Gem House source code development, Magic Gem House Consulting: 185,2946,0381 Mr. Chen (micro-electric), Magic Gem House mode development, Magic Gem House app development, Magic Gem House P
Cocoapos Execute the Install times error as follows
Generating Pods Project Abort Trap:6
You need to execute the following command
sudo gem uninstall cocoapodssudo gem uninstall Cocoapods-coresudo gem uninstall cocoapods-deintegratesudo gem uninstall Cocoapods-downloadersudo gem
at hand. Just pull it up first!
Install Ubuntu7.10. Let's stop talking about it. After Ubuntu is installed, we can see that 189 updates and updates have all been updated... and so on.
Then install gcc, sudo apt-get install libc6-dev .....
Download the Ruby 1.8.6 source code. I 'd like to download 1.9.0. However, it is said that 1.9.0 is not compatible with the old version. Please use 1.8.6 to compile... crazy ....
Install rubygems and download the latest 1.0.1. In the end, we need library stubs
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.