Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails project: Could not open library 'libcurl.so.4': libcurl.so.4: cannot open shared object file: No such file or directory #2461

Open
MartinElvar opened this issue Dec 19, 2024 · 0 comments
Labels
bug Something isn't working triage Issue needs triage

Comments

@MartinElvar
Copy link

MartinElvar commented Dec 19, 2024

What happened?

When i start my rails project i get the following error message, I'm on Nixos.

/home/saturn/Projects/ruby/bootcamp-api/.devbox/virtenv/ruby/gems/ffi-1.15.5/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library 'libcurl': libcurl: cannot open shared object file: No such file or directory. (LoadError)
Could not open library 'libcurl.so': libcurl.so: cannot open shared object file: No such file or directory.
Could not open library 'libcurl.so.4': libcurl.so.4: cannot open shared object file: No such file or directory

I can get it to run using the following nix shell command mentioned in this thread https://discourse.nixos.org/t/ruby-gem-typhoeus-could-not-open-library-libcurl/2677/11

Steps to reproduce

No response

Command

No response

devbox.json

{
  "packages": {
    "ruby": "3.3",
    "bundler": "2.5",
    "nodejs":  "21",
    "yarn":    "1.22",
    "sqlite":  "latest",
    "postgresql": {
      "version": "latest",
      "outputs": [
        "out",
        "dev"
      ]
    },
    "heroku":   "latest",
    "protobuf": "latest",
    "git":      "latest",
    "curl": {
      "version": "latest",
      "outputs": ["out", "dev"]
    }
  },
  "shell": {
    "init_hook": [
      "gem install rails -v 7.2",
      "./blog/bin/bundle install"
    ],
    "scripts": {
      "run_test": [
        "./blog/bin/rails test"
      ],
      "start_server": [
        "./blog/bin/rails server"
      ]
    }
  }
}

Devbox version

0.13.6

Nix version

nix (Nix) 2.25.2

What system does this bug occur on?

Linux (x86-64)

Debug logs

No response

@MartinElvar MartinElvar added bug Something isn't working triage Issue needs triage labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

1 participant