Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Discourse
  3. Delete topics in Discourse

Delete topics in Discourse

Scheduled Pinned Locked Moved Solved Discourse
3 Posts 3 Posters 1.3k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nafets-lesierk
    wrote on last edited by
    #1

    Hard and permanently deleting topics in Discourse is a highly proteced feat.
    The instructions say that one must invoke the Rails console and set

    SiteSetting.can_permanently_delete = true
    

    See: https://meta.discourse.org/t/introducing-permanently-delete-post-functionality/207109
    Not getting this to work - throwing following log:
    Is it the read-only!?
    Cheers

    /home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/irb/ext/save-history.rb:116:in `initialize': Read-only file system @ rb_sysopen - /home/cloudron/.irb_history (Errno::EROFS)
            from /home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/irb/ext/save-history.rb:116:in `open'
            from /home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/irb/ext/save-history.rb:116:in `save_history'
            from /home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/irb/ext/save-history.rb:60:in `block in extended'
            from /home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/irb.rb:504:in `block in run'
            from /home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/irb.rb:504:in `each'
            from /home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/irb.rb:504:in `run'
            from /home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/irb.rb:421:in `start'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/railties-7.0.5.1/lib/rails/commands/console/console_command.rb:74:in `start'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/railties-7.0.5.1/lib/rails/commands/console/console_command.rb:19:in `start'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/railties-7.0.5.1/lib/rails/commands/console/console_command.rb:106:in `perform'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/railties-7.0.5.1/lib/rails/command/base.rb:87:in `perform'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/railties-7.0.5.1/lib/rails/command.rb:48:in `invoke'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/railties-7.0.5.1/lib/rails/commands.rb:18:in `<main>'
            from <internal:/home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
            from <internal:/home/cloudron/rbenv/versions/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
            from script/rails:8:in `<top (required)>'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in `load'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:23:in `run'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:492:in `exec'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:34:in `dispatch'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:28:in `start'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/exe/bundle:45:in `block in <top (required)>'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
            from /app/code/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.13/exe/bundle:33:in `<top (required)>'
            from /home/cloudron/rbenv/versions/3.2.1/bin/bundle:25:in `load'
            from /home/cloudron/rbenv/versions/3.2.1/bin/bundle:25:in `<main>'
    
    1 Reply Last reply
    2
    • nebulonN nebulon marked this topic as a question on
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Just tried this on a fresh installation and running the mentioned command:

      SiteSetting.can_permanently_delete = true
      

      in a rails console session via the webterminal and:

      gosu cloudron:cloudron bundle exec script/rails console
      

      Then without restarting discourse, the option will appear in the UI on browser refresh and it works fine here.

      I can't reproduce the error about /home/cloudron/.irb_history (Errno::EROFS) but that sounds very much like a read-only issue. For this we would need to probably create a link for that file into /app/data, but I would first like to understand where this comes from.

      1 Reply Last reply
      1
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        Is this still a problem? In the new base image atleast, the .irb_history file is symlinked.

        1 Reply Last reply
        0
        • girishG girish has marked this topic as solved on

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search