gpt4 book ai didi

ruby-on-rails - 为什么我的 Rails 服务器不能在 cloud9 中工作

转载 作者:数据小太阳 更新时间:2023-10-29 08:11:48 26 4
gpt4 key购买 nike

我的 ruby​​ on rails 服务器突然停止工作(Cloud9、Mac OS)。这是我不断收到的错误信息:

/usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/values/time_zone.rb:285: warning: circular argument reference - now
/usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/server.rb:34:in `parse!': missing argument: -p (OptionParser::MissingArgument)
from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/server.rb:293:in `parse_options'
from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/server.rb:184:in `options'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/server.rb:60:in `set_environment'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/server.rb:44:in `initialize'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `new'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

我已经尝试了我在这里能找到的一切,但没有成功。抱歉,如果此解决方案在此处某处。这是我的 Gem 文件

source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'

gem 'rails', '4.1.0'

# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]

# Use postgresql as the database for production
group :production do
gem 'pg'
gem 'rails_12factor'
end

# Use SCSS for stylesheets
gem 'sass-rails', '4.0.3'
# Use bootstrap library for styles
gem 'bootstrap-sass', '3.3.1'
# Use font awesome library for icons
gem 'font-awesome-sass', '4.2.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use devise for user auth
gem 'devise', '~>3.4.1'
# Use stripe for handling payments
gem 'stripe', '1.16.1'
# Use figaro to hide secret keys
gem 'figaro', '1.0.0'

# Use ActiveModel has_secure_password
# gem 'bcrypt', '3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]

最佳答案

在 cloud9(与 nitrous 相对)中,您使用 rails s -b $IP -p $PORT 启动您的服务器

关于ruby-on-rails - 为什么我的 Rails 服务器不能在 cloud9 中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31493423/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com