私は、Ruby on Rails を試して学習し、基本的なブートストラップ サイトを開発することに挑戦しました。それが助けになるなら、私はJavaから来ました。
私は複数のチュートリアルに従い、多くのビデオを見てきましたが、Ruby on Rails を使い始めるのにかなり苦労しています。
詳細:
- 私はRVMを使用していません。
- 64 ビット Windows 7 で Cygwin を使用しています。
- Ruby on Rails に必要なすべてのパッケージがあります。
- Rubygems、Rruby、Rails がある他のすべての場所を削除した (または少なくとも試した) ので、すべて Cygwin にあるはずです。
which ruby
Cygwinと入力すると、/usr/bin/Ruby
.- と入力すると
which rails
、 が表示されます/usr/bin/rails
。 - 使用している RubyGems を取得する方法がわかりません。これは主に、gem などは今のところ完全に異質であるためです。チュートリアルではまだそこまで進んでいません。
rails -v
またはを実行するrails server
と、次のエラーが表示されます。
Could not find gem 'sqlite3-ruby (>= 0) ruby' in any of the gem sources listed in your Gemfile.
Try running `bundle install`.
bundle install
またはを実行するとbundle update
、エラーが表示されますが、他の誰かが取得しているようには見えません。
Fetching source index for http://rubygems.org/
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:253:in `fetch_all_remote_specs': undefined method `list' for #<Gem::SpecFetcher:0x00000600716118> (NoMethodError)
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:234:in `block in remote_specs'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:231:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:231:in `remote_specs'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:165:in `fetch_specs'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:70:in `specs'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:176:in `block (2 levels) in index'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:175:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:175:in `block in index'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/index.rb:7:in `build'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:174:in `index'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:168:in `resolve'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:107:in `specs'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:102:in `resolve_remotely!'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/installer.rb:43:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/installer.rb:8:in `install'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/cli.rb:219:in `install'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/vendor/thor/base.rb:386:in `start'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/bin/bundle:13:in `<top (required)>'
from /usr/bin/bundle:23:in `load'
from /usr/bin/bundle:23:in `<main>'
I'm fine with installing RVM, though when I do, I'm afraid I'll run into incompatibilities because I'm doing this from Cygwin, and I messed this all up two days ago, I finally got it to get this far.
私が使用しているチュートリアルは次のとおりです。
- http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
- YouTube 動画の組み合わせ。
また、Rails がローカル データベースのテストに SQLLite を使用する方法を読んでいました。これは、Mongo を使用する能力に影響しますか? 私は最近、その使用方法を学びましたが、すでにログに記録するために取り組んでいる小さなプロジェクトで使用し始めています。