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
Why is there this?Due to domestic network reasons (you know), the intermittent connection to the resource file that rubygems.org stored on Amazon S3 failed. So you will encounter gem install rack or bundle install when the time is not responding, specifically can be used gem install rails -V to view the execution process.This is a full rubygems.org image, you can
Rubyrailsdevkitsqlite3 environment dependencies installed with railsinstaller have been installed now want to try mysqlC: windowssystem32 gt; railsnewE: rubykk10-dmysqlInstallingmysql2 (0.3.13) Gem: Installer: ExtensionBuildError: ERROR: warning. f: railsRailsInstalle... mysqlgemrailsrailsinstallerruby
Ruby rails devkit sqlite3 on which the environment installed with railsinstaller depends has been in
Ruby
That's not much to say.
RVM
Used to help you install a ruby environment, help you manage multiple ruby environments, and help you manage which Ruby environment you use on your computer for each ruby application you develop. The ruby environment is not just Ruby itself, it also includes dependent Third-party Ruby Plug-ins. are managed by RVM.
Rails
This also needless to say, the famous development framework. See Http://zh.wikipedia.org/wiki/R
Ruby
You don't need to talk about this.
RVM
It is used to help you install the Ruby environment, help you manage multiple Ruby environments, and help you manage the Ruby environment on which the Ruby application you develop uses the machine. The Ruby environment is not only Ruby itself, but also a third-party Ruby plug-in on which it depends. All are managed by RVM.
Rails
Needless to say, this is a well-known development framework. Look at http://zh.w
always be the first gem installed on the system. Rake is a build tool similar to make, but it allows Ruby to write rakefile (how to build a definition file ), specifically, a specific DSL (domain-specific language) is used to provide high readability while maintaining Ruby's powerful functions. Rails uses rake extension to complete a variety of undesirable tasks, such as database initialization and updates
, let's create the controller first.
The command line is as follows: Ruby script/generate Controller Hello
This produces a controller that corresponds to the c:/rubydev/first/app/controllers hello_controller.rb
Create an action, which is to modify the contents of the C:/rubydev/first/app/controllers hello_controller.rb file as follows:
Class Hellocontroller def thereEndEnd
Step Seventh: Write the there.rhtml below the/app/views/hello directory, which reads as follows:
This is your the on
Ruby on rails gem install pg cannot be installed, rubyrails
gem install pg -v '0.18.2'Building native extensions. This could take a while...ERROR: Error installing pg: ERROR: Failed to build gem native extension. current directory: /Users/bevan/.rvm/gems/ruby-2.3.0/gems/pg-0.18.2/ext/Users/bevan/.rvm/rubies/rub
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
Document reprinted by Fire Site Building InstituteTo install the oracle driver using gem in ruby on rails, see the original article:
Reference content is as follows:[1] viewing locally installed plug-insGem list orGem list -- local[2] viewing remote available plug-insGem list -- romote[3] viewing oracle driversGem list -- remote | grep oracleThe result is as follows:Activerecord-oracle_enhanced
Label: I/O, AR, SP on C file BSThis problem found during development todayThe per function of kaminari cannot be used in any configuration, and the page size is fixed at 30.At first, I thought it was the gem of ransack. I searched the internet for a long time and found that noFinally, check carefully. It turns out that the gemfile contains will_pagination. After you delete it, everything will return to normal.After you use kaminari in Ruby on
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
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.