我使用Pow和粉末宝石与我的rails项目。
现在我尝试升级我的ruby版本(从1.9.3升级到2.0.0,我使用RVM)
当我切换ruby版本,安装所有的gem依赖项时,我会通过运行rails s和访问localhost:3000来确保应用程序正常工作。
以前,我通过pow访问http://my_app.dev来浏览我的应用程序。升级后,由于错误的Bundler::RubyVersionMismatch: Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0,这个url无法工作
我试过的是:
重新创建pow应用程序
有人能告诉我为什么吗?
salvator:edu uko$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
和
salvator:edu uko$ rails s
=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-11-20
我正在rails项目的cloud9上工作,我跟踪。
问题是,我不能同时运行rails服务器和php,因为它们似乎都使用相同的端口。要启动rails服务器,我使用rails s -b $IP -p $PORT。
下面是我遇到的错误:
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:205:in `bind': Address already in use - bind(2) for 0.0.0.0:8080 (Errno::EADDRINUSE)
有谁知道怎么解决这个问题吗?
我正在Ubuntu10.04LTS上工作,Lynx已经在它上安装了Rails 3。我无法启动Rails服务器。我得到了以下错误。
mah@mah-laptop:~/Desktop/projects/ver$ rails s
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.8/lib/rails/commands.rb:29:in `block in <top (required)>': undefined method `root' for nil:NilClass (NoMethodError)
from /
我刚刚登录到Cloud9上的Ubuntu工作区。登录时我看到了一个错误。
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does
that too, you can ignore these warnings with 'rvm rvmrc warning ignore
/home/ubuntu/workspace/Simutronix/Gemfile'. To ignore the warning for
all files run 'rvm rvmrc warning ignore
我在ubuntu中运行rails s时遇到了问题。当我键入rails s时,它不会启动服务器,而是会给出以下消息:
kyala@ubuntu:~/depot$ rails s
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/kyala/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
-d
我今天遇到了一个问题,到目前为止我还没有找到任何幸运的问题。我创建了一个新的迁移文件(通过'rails g migrate ...')。创建文件后,当我运行rails db:migrate或rails db:migrate:status时,结果是rails似乎无限地启动了自己--即forking。如果我删除新的迁移文件,这种情况就不会再发生-例如,rails db:migrate:status会导致状态报告显示并完成。为了在我运行迁移时验证rails是分叉的,我在一个单独的终端中运行: while :; do date;echo ....................;pg
我在bin/rake和bin/rails中被拒绝允许,所以我执行chmod +x bin/rake和bin/rails。但是,当我执行rails控制台或rails服务器时,
env: ruby.exe: No such file or directory
惟一的工作是捆绑exec rails控制台或bundle exec rails服务器。我想知道为什么,因为在我的其他Rails项目中,以及当我创建新rails项目时,rails的s/c仍然工作。
在/.ruby-version和/.tools-versions中更新了我的rails s版本后,我尝试在我的rails 3.2.13应用程序中运行我的Rails服务器( Ruby ),但得到以下消息:
asdf: No version set for command rails
you might want to add one of the following in your .tool-versions file:
ruby 2.2.4
然而,我已经在两个版本的文件中更新了ruby到2.3.0,这在两个版本中都有反映。当我输入asdf which ruby时,ruby版本也是2.3.
我刚用postgres 9.5将Rails 4.2.0应用程序的ruby从2.2.4升级到2.3.3。启动rails s时,pg适配器未加载:
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': Specified 'postgresql' for data
base adapter, but the gem is not lo
每当我运行服务器时,使用
rails s
我得到了这样的信息:
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-08-12 19:57:32] INFO WEBrick 1.3.1
[2012-08-12 19:57:32] INFO ruby 1.9.3 (2012-04-20) [i686-linux]
[2012-08-12 19:57:32] W
我正在尝试让一个在Linux (Redhat)服务器上使用Bundler/Torquebox的Rails 2.3应用程序。应用程序可以通过JBoss正常工作,但不允许启动控制台。运行jruby script/console时出现以下错误
Bundler could not find compatible versions for gem "torquebox-web":
In snapshot (Gemfile.lock):
torquebox-web (2.3.1)
In Gemfile:
torquebox (= 2.3.1) ruby depen
最近,我按照本教程在rails上安装了一个ruby服务器:
但我是在根上做的。
服务器似乎工作正常,因为当我键入命令rails服务器时,它向我展示了以下内容:
root@pavlos55-SATELLITE-S50-B:/home/pavlos55/myapp# rails server
=> Booting WEBrick
=> Rails 4.2.4 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
我已经三天不能运行我的本地服务器了。重新启动计算机无济于事。有几次,在重复尝试了大约40-50次之后,它随机地工作了-我不知道为什么。我试过一次不同的端口,它工作了,但从那时起,没有端口工作。每次我尝试运行我的rails服务器时,我都会得到这样的结果。
/Users/colmtuite/.rvm/gems/ruby-2.2.0/gems/eventmachine-1.0.5/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (Ru
我使用的是Rails 3.2.1,在Gemfile中'ruby-debug19‘行已经被注释掉了。当我在开发模式下启动服务器时,服务器启动时没有任何问题。然而,当我在生产模式下启动我的服务器时(rails服务器-e生产,我得到了以下错误(参见下面的堆栈跟踪):
... `rescue in depend_on': No such file to load -- ruby-debug (LoadError)
我花了相当多的时间试图找出谁在没有任何运气的情况下需要reby-debug。除了我的Gemfile和堆栈之外,我不确定要包含什么。我真的很感谢任何人的帮助。
还有一条信息:我
我是一名经验丰富的web开发人员,我开始学习ruby on rails,将HTML和CSS的使用绑定到rails的代码中。我有一个测试网站,并试图在ruby on rails上运行它。该测试将在web上的一个rails应用程序下显示一个网站,其中包含主页、帮助、关于和联系页面。
require 'test_helper'
class StaticPagesControllerTest < ActionController::TestCase
test "should get home" do
get :home
assert_r
是否有人使用Ruby 2.7.0解决了此问题
我使用rbenv并安装了Rubyv2.7.0,然后使用Rails v6.0.2.1创建了一个Rails项目。
目前,通过运行
rails s
rails s -u puma
rails s -u webrick
服务器启动了,站点也得到了服务,但在Console日志中我看到了两条警告消息:
local:~/rcode/rb27$ rails s
=> Booting Puma
=> Rails 6.0.2.1 application starting in development
=> Run `rails server --h
所以我正在开发一个已经创建的红宝石应用程序。
我们雇佣的承包商花了很长的时间来完成这项工作,因此,由于这个原因,我在这个应用程序中对它的设置一无所知。
当我运行本地服务器时,我得到以下信息:
C:\Users\chris\Documents\suitsandtables>ruby bin\rails server
=> Booting Puma
=> Rails 5.1.2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more star
我刚刚设置了一个VPS来准备启动Rails应用程序,并且在实际的远程服务器上,我创建了一个新的rails项目来进行测试,只执行rails new blog -d postgresql。然后,我尝试使用rails s命令启动服务器,得到以下错误。
.rvm/gems/ruby-1.9.3-p429@anwalt/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs
当我试图启动Rails服务器时,会出现以下错误:
22: from bin/rails:4:in `<main>'
21: from bin/rails:4:in `require'
20: from /root/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
19: from /root/.rbenv/versions/2.7.