简体   繁体   中英

Ruby on Rails server error

i'm not a full RoR developer (php developer mostly), i've only don't small projects/tutorials, but i've inherited a rails project and though my environment mimics the heroku production environment, i stil have a problem on our local in house environment. we are migrating the application to be hosted in house.

i've run bundle install and i have all the gems needed, but i still get a random error for: Could not find Ascii85-1.0.1 in any of the sources (Bundler::GemNotFound) . i ran gem list and the gem exists, but the application won't run. the database connection appears to be correct, i'm just not sure what the issue is, any advice would be great - thanks in advance.

attached is the full passenger/rake error: 在此输入图像描述

In more detail: the reason you're seeing this error is because something in your application is asking to require the Ascii85 code. This could be in your app's code, or in one of its gems or plugins.

To see a gem's dependencies (ie what it needs) and what requires it:

$ gem dependency Ascii85 --reverse-dependencies
Gem Ascii85-1.0.1
  bundler (>= 1.0.0, development)
  rspec (>= 2.4.0, development)
  Used by
    pdf-reader-1.1.0 (Ascii85 (~> 1.0.0))

So the pdf-reader gem is a possible issue. The results on your system may different.

Looking at pdf-reader:

$ gem dependency pdf-reader --reverse-dependencies
Gem pdf-reader-1.1.0
  Ascii85 (~> 1.0.0)
  ZenTest (~> 4.4.2, development)
  rake (>= 0, development)
  roodi (>= 0, development)
  rspec (~> 2.3, development)
  ruby-rc4 (>= 0)
  Used by
    prawn-0.12.0 (pdf-reader (>= 0.9.0))

So the prawn gem needs pdf-reader, which needs Ascii85.

In Rails, it happens from time to time that an app author or gem author doesn't add all the dependencies to the Gemfile or install scripts.

Usually this is a mistake and easy to fix - you can fix it in your app by adding the gem, and ideally also you can contact the author to suggest a fix.

Sometimes there are reasons for a missing dependency, such as code that needs an implementation of a method but leaves it up to you which gem to install to provide the method.

Hope this helps.

Just include the same gem in your Gemfile and do bundle install. In the Gemfile just put the below line,

gem "Ascii85", "~> 1.0.1"

Try ' bundle install '. It will sort out the problem.

Thanks :)-

Be sure to have

umask 0022

when running things like... bundle install

Alternatively:

bundle install --path vendor/bundle  

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM