rails server Could not find gem 'sqlite3-ruby (>= 0)'

解决Ruby安装SQLite3及启动Rails服务器问题
本文解决在使用Ruby安装SQLite3并启动Rails服务器时遇到的问题,包括安装缺失依赖、更改gem包名及成功运行Rails服务器的步骤。


E:\fanghuixing\rubygems\rubygems-1.8.8>gem install rails
Successfully installed rails-3.0.10
1 gem installed
Installing ri documentation for rails-3.0.10...
file 'lib' not found
Installing RDoc documentation for rails-3.0.10...
file 'lib' not found

E:\fanghuixing\rubygems\rubygems-1.8.8>gem install rails --no-ri --no-rdoc
Successfully installed rails-3.0.10
1 gem installed

E:\fanghuixing\rubygems\rubygems-1.8.8>cd ..

E:\fanghuixing\rubygems>cd ..

E:\fanghuixing>cd railsapp

E:\fanghuixing\railsapp>rails server
[31mCould not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in you
r Gemfile.[0m
[33mRun `bundle install` to install missing gems.[0m

E:\fanghuixing\railsapp>gem install sqlite3-ruby
Fetching: sqlite3-1.3.4-x86-mingw32.gem (100%)
Fetching: sqlite3-ruby-1.3.3.gem (100%)

#######################################################

Hello! The sqlite3-ruby gem has changed it's name to just sqlite3.  Rather than
installing `sqlite3-ruby`, you should install `sqlite3`.  Please update your
dependencies accordingly.

Thanks from the Ruby sqlite3 team!

<3 <3 <3 <3

#######################################################

Successfully installed sqlite3-1.3.4-x86-mingw32
Successfully installed sqlite3-ruby-1.3.3
2 gems installed
Installing ri documentation for sqlite3-1.3.4-x86-mingw32...
Installing ri documentation for sqlite3-ruby-1.3.3...
Installing RDoc documentation for sqlite3-1.3.4-x86-mingw32...
Installing RDoc documentation for sqlite3-ruby-1.3.3...

E:\fanghuixing\railsapp>rails server
=> Booting WEBrick
=> Rails 3.0.10 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-08-20 12:33:48] INFO  WEBrick 1.3.1
[2011-08-20 12:33:48] INFO  ruby 1.9.2 (2011-07-09) [i386-mingw32]
[2011-08-20 12:33:48] INFO  WEBrick::HTTPServer#start: pid=3148 port=3000
PS E:\rubyProject\student_curd> bundle exec rails server Usage: rails new APP_PATH [options] Options: [--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated engines) [--skip-collision-check], [--no-skip-collision-check] # Skip collision check -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: E:/Bitnami/redmine-5.0.3-0/ruby/bin/ruby.exe -m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL) -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) # Default: sqlite3 [--skip-gemfile], [--no-skip-gemfile] # Don&#39;t create a Gemfile -G, [--skip-git], [--no-skip-git] # Skip .gitignore file [--skip-keeps], [--no-skip-keeps] # Skip source control .keep files -M, [--skip-action-mailer], [--no-skip-action-mailer] # Skip Action Mailer files [--skip-action-mailbox], [--no-skip-action-mailbox] # Skip Action Mailbox gem [--skip-action-text], [--no-skip-action-text] # Skip Action Text gem -O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files [--skip-active-job], [--no-skip-active-job] # Skip Active Job [--skip-active-storage], [--no-skip-active-storage] # Skip Active Storage files -P, [--skip-puma], [--no-skip-puma] # Skip Puma related files -C, [--skip-action-cable], [--no-skip-action-cable] # Skip Action Cable files -S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files [--skip-spring], [--no-skip-spring] # Don&#39;t install Spring application preloader [--skip-listen], [--no-skip-listen] # Don&#39;t generate configuration that depends on the listen gem -J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files [--skip-turbolinks], [--no-skip-turbolinks] # Skip turbolinks gem [--skip-jbuilder], [--no-skip-jbuilder] # Skip jbuilder gem -T, [--skip-test], [--no-skip-test] # Skip test files [--skip-system-test], [--no-skip-system-test] # Skip system test files [--skip-bootsnap], [--no-skip-bootsnap] # Skip bootsnap gem [--dev], [--no-dev] # Set up the application with Gemfile pointing to your Rails checkout [--edge], [--no-edge] # Set up the application with Gemfile pointing to Rails repository [--master], [--no-master] # Set up the application with Gemfile pointing to Rails repository main branch [--rc=RC] # Path to file containing extra configuration options for rails command [--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file [--api], [--no-api] # Preconfigure smaller stack for API only apps [--minimal], [--no-minimal] # Preconfigure a minimal rails app -B, [--skip-bundle], [--no-skip-bundle] # Don&#39;t run bundle install --webpacker, [--webpack=WEBPACK] # Preconfigure Webpack with a particular framework (options: react, vue, angular, elm, stimulus) [--skip-webpack-install], [--no-skip-webpack-install] # Don&#39;t run Webpack install Runtime options: -f, [--force] # Overwrite files that already exist -p, [--pretend], [--no-pretend] # Run but do not make any changes -q, [--quiet], [--no-quiet] # Suppress status output -s, [--skip], [--no-skip] # Skip files that already exist Rails options: -h, [--help], [--no-help] # Show this help message and quit -v, [--version], [--no-version] # Show Rails version number and quit Description: The &#39;rails new&#39; command creates a new Rails application with a default directory structure and configuration at the path you specify. You can specify extra command-line arguments to be used every time &#39;rails new&#39; runs in the .railsrc configuration file in your home directory, or in $XDG_CONFIG_HOME/rails/railsrc if XDG_CONFIG_HOME is set. Note that the arguments specified in the .railsrc file don&#39;t affect the defaults values shown above in this help message. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
09-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值