Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 运行rails服务器时发生linecache错误_Ruby_Ruby On Rails 3_Gem - Fatal编程技术网

Ruby 运行rails服务器时发生linecache错误

Ruby 运行rails服务器时发生linecache错误,ruby,ruby-on-rails-3,gem,Ruby,Ruby On Rails 3,Gem,运行“rails服务器”命令时出现以下错误。以下是错误: maruf@phoenix:/media/resource/RoR/project$ rails server /usr/local/rvm/gems/ruby-1.9.2-p320@project/bundler/gems/linecache19-0.5.13-c0804efc995a/lib/tracelines19.rb:12:in `require': no such file to load -- /usr/local/rvm/

运行“rails服务器”命令时出现以下错误。以下是错误:

maruf@phoenix:/media/resource/RoR/project$ rails server
/usr/local/rvm/gems/ruby-1.9.2-p320@project/bundler/gems/linecache19-0.5.13-c0804efc995a/lib/tracelines19.rb:12:in `require': no such file to load -- /usr/local/rvm/gems/ruby-1.9.2-p320@project/bundler/gems/linecache19-0.5.13-c0804efc995a/lib/../lib/trace_nums19 (LoadError)
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/bundler/gems/linecache19-0.5.13-c0804efc995a/lib/tracelines19.rb:12:in `rescue in <module:TraceLineNumbers>'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/bundler/gems/linecache19-0.5.13-c0804efc995a/lib/tracelines19.rb:8:in `<module:TraceLineNumbers>'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/bundler/gems/linecache19-0.5.13-c0804efc995a/lib/tracelines19.rb:6:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/bundler/gems/linecache19-0.5.13-c0804efc995a/lib/linecache19.rb:69:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/bundler/gems/linecache19-0.5.13-c0804efc995a/lib/linecache19.rb:69:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
from /media/resource/RoR/project/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/railties-3.2.11/lib/rails/commands.rb:53:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/railties-3.2.11/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
from /usr/local/rvm/gems/ruby-1.9.2-p320@project/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
以下是“gem list”命令的输出:

actionmailer (3.2.11)
actionpack (3.2.11)
activemodel (3.2.11)
activerecord (3.2.11)
activeresource (3.2.11)
activesupport (3.2.11)
archive-tar-minitar (0.5.2)
arel (3.0.2)
builder (3.0.4)
bundler (1.2.3)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
columnize (0.3.6)
commonjs (0.2.6)
debugger-linecache (1.1.2)
debugger-ruby_core_source (1.1.7)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.0)
json (1.7.6)
less (2.2.2)
less-rails (2.2.6)
libv8 (3.11.8.13 x86-linux)
linecache19 (0.5.12)
mail (2.4.4)
mime-types (1.19)
multi_json (1.5.0)
mysql2 (0.3.11)
polyglot (0.3.3)
rack (1.4.4)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.11)
railties (3.2.11)
rake (10.0.3)
rbx-require-relative (0.0.9)
rdoc (3.12)
ref (1.0.2)
ruby-debug-base19 (0.11.25)
ruby-debug-base19x (0.11.30.pre10)
ruby-debug-ide (0.4.17.beta16, 0.4.17.beta14)
ruby-debug19 (0.11.6)
ruby_core_source (0.1.5)
sass (3.2.5)
sass-rails (3.2.6)
sprockets (2.2.2)
therubyracer (0.11.3)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
twitter-bootstrap-rails (2.2.0)
tzinfo (0.3.35)
uglifier (1.3.0)
zclip-rails (0.0.1)
我正在使用

轨道3.2.11 及 ruby 1.9.2p320(2012-04-20修订版35421)[i686 linux]


如何解决此问题以运行服务器?

gem文件中列出的linecache19版本似乎比“gem列表”中显示的版本更新。你试过运行“bundle update”吗?

我通过将trace\u nums19.bundle复制到其丢失的文件夹中,解决了同样的问题。你可以在linecache gem的lib文件夹中找到这个文件。你能解决这个问题吗?是的,但我不记得具体是怎么解决的。我认为我手动添加了行缓存。很抱歉,我帮不上忙。我试图搜索该文件,但徒劳。你能告诉我你在哪里找到文件的吗?
actionmailer (3.2.11)
actionpack (3.2.11)
activemodel (3.2.11)
activerecord (3.2.11)
activeresource (3.2.11)
activesupport (3.2.11)
archive-tar-minitar (0.5.2)
arel (3.0.2)
builder (3.0.4)
bundler (1.2.3)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
columnize (0.3.6)
commonjs (0.2.6)
debugger-linecache (1.1.2)
debugger-ruby_core_source (1.1.7)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.0)
json (1.7.6)
less (2.2.2)
less-rails (2.2.6)
libv8 (3.11.8.13 x86-linux)
linecache19 (0.5.12)
mail (2.4.4)
mime-types (1.19)
multi_json (1.5.0)
mysql2 (0.3.11)
polyglot (0.3.3)
rack (1.4.4)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.11)
railties (3.2.11)
rake (10.0.3)
rbx-require-relative (0.0.9)
rdoc (3.12)
ref (1.0.2)
ruby-debug-base19 (0.11.25)
ruby-debug-base19x (0.11.30.pre10)
ruby-debug-ide (0.4.17.beta16, 0.4.17.beta14)
ruby-debug19 (0.11.6)
ruby_core_source (0.1.5)
sass (3.2.5)
sass-rails (3.2.6)
sprockets (2.2.2)
therubyracer (0.11.3)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
twitter-bootstrap-rails (2.2.0)
tzinfo (0.3.35)
uglifier (1.3.0)
zclip-rails (0.0.1)