Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Problems updating OP

Problems updating OP

Added by Bernd Müller over 9 years ago

Ah…need help here.

I tried to update my OP to the latest version, I use the manual installation update. Now I am stuck deeply—-

RAILS_ENV="production" bundle exec rake db:migrate
The git source git://github.com/finnlabs/awesome_nested_set.git is not yet checked out. Please run `bundle install` before trying to start your application

The command bundle install leads ti following:

Resolving dependencies............................
Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    rails (= 4.2.4)

    openproject-documents was resolved to 4.1.4, which depends on
      rails (~> 3.2.9)

    openproject-documents was resolved to 4.1.4, which depends on
      rails (~> 3.2.9)

    openproject-pdf_export was resolved to 4.1.4, which depends on
      rails (~> 3.2.14)

    openproject-translations was resolved to 5.0.8, which depends on
      rails (~> 4.2.3)

    prototype-rails was resolved to 4.0.0, which depends on
      rails (~> 4.0)

I need to have OP online again… :/


Replies (5)

RE: Problems updating OP - Added by Bernd Müller over 9 years ago

Ah!

This was of course related to the plugins, I have disabled them, so I was able to bundle install
But now, of course I get a new message, when I trying to update the DB

openproject@moserver:~/openproject$ RAILS_ENV="production" bundle exec rake db:migrate --trace
rake aborted!
LoadError: cannot load such file -- net/ssh
/home/openproject/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/home/openproject/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/home/openproject/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
...

What does this mean? net/ssh in this context? Any suggestions are welcome.

Cheers.

RE: Problems updating OP - Added by Bernd Müller over 9 years ago

A step further I got…not sure in what direction, but hey, I see something new now, after adding

net/ssh to my gems

openproject@moserver:~/openproject$ RAILS_ENV="production" bundle exec rake db:migrate
rake aborted!
NoMethodError: undefined method `map' for "\x04\b[\aI\"\ade\x06:\x06ETI\"\aen\x06;\x00T":String
/home/openproject/openproject/config/initializers/30-redmine.rb:37:in `<top (required)>'
/home/openproject/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'

Oh…dear, I guess that I found a way to solved that issue as this one is described here [https://community.openproject.org/work_packages/22278/activity]. But now I get this here:

RAILS_ENV="production" bundle exec rake db:migrate
== 20140430125956 ResetContentTypes: migrating ================================
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

undefined method `empty?' for #<File:0x000000093c80a8>/home/openproject/openproject/lib/open_project/content_type_detector.rb:113:in `blank_name?'

LORD!!

I guess that my DB is a Zombie….

RE: Problems updating OP - Added by Bernd Müller over 9 years ago

Ah….this is still my old problem that I got…see [[https://community.openproject.org/topics/5353]]
sigh If there is someone that is willing to help me on this, it’d be appreciated.

RE: Problems updating OP - Added by Bernd Müller over 9 years ago

openproject@moserver:~/openproject$ RAILS_ENV="production" bundle exec rake db:seed
You have 11 pending migrations:
  20140430125956 ResetContentTypes
  20150629075221 AddScmTypeToRepositories
  20150716133712 AddUniqueIndexOnJournals
  20150716163704 RemoveFilesystemRepositories
  20150729145732 AddStorageInformationToRepository
  20150819143300 UnderscoreScmSettings
  20150820133700 DenullifyDisplaySums
  20150827133700 RemoveProjectHomepage
  20151005113102 RemoveSummaryFromProject
  20151028063433 BoolearlizeBoolCustomValues
  20151116110245 FixCustomizableBoolValues
Run `rake db:migrate` to update your database then try again.
openproject@moserver:~/openproject$ clear ; RAILS_ENV="production" bundle exec rake db:migrate --trace

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== 20140430125956 ResetContentTypes: migrating ================================
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

undefined method `empty?' for #<File:0x00000005bada60>/home/openproject/openproject/lib/open_project/content_type_detector.rb:113:in `blank_name?'
/home/openproject/openproject/lib/open_project/content_type_detector.rb:93:in `detect'
/home/openproject/openproject/app/models/attachment.rb:164:in `content_type_for'
/home/openproject/openproject/db/migrate/20140430125956_reset_content_types.rb:32:in `block in up'

I guess that this “20140430125956 ResetContentTypes” migration is the troublemaker but what to do?

RE: Problems updating OP - Added by Doug Perham over 9 years ago

looks like a “File” object is being passed as the ContentTypeDetector argument rather than a filename string. a string object has an “empty?” method, whereas the File object does not.

would love to see a few lines of context at each of the lines listed. This is what 5 lines of context looks like on my system:

undefined method `empty?' for #<File:0x00000005bada60>/opt/openproject/lib/open_project/content_type_detector.rb:113:in `blank_name?'

    def blank_name?
      @filename.nil? || @filename.empty?
    end



/opt/openproject/lib/open_project/content_type_detector.rb:93:in `detect'
    # Returns a String describing the file's content type
    def detect
      type = if blank_name?
               SENSIBLE_DEFAULT
             elsif empty_file?


/opt/openproject/app/models/attachment.rb:164:in `content_type_for'
    self.digest = Digest::MD5.file(file.path).hexdigest
  end

  def self.content_type_for(file_path, fallback = OpenProject::ContentTypeDetector::SENSIBLE_DEFAULT)
    content_type = Redmine::MimeType.narrow_type file_path, OpenProject::ContentTypeDetector.new(file_path).detect


/opt/openproject/db/migrate/20140430125956_reset_content_types.rb:32:in `block in up'
  def up
    Attachment.all.each do |attachment|
      attachment.update_column(:content_type, Attachment.content_type_for(attachment.diskfile))
    end
  end
  • (1 - 5/5)
Loading...