How to solve 'libcurl' not found with Rails on Windows

前端 未结 9 1126
旧巷少年郎
旧巷少年郎 2020-12-05 17:48

This is giving me a headache. I\'m continuing a Rails project that started on Linux and I keep getting this when I run Puma on Ruby Mine:

Error:[rake --tasks         


        
9条回答
  •  忘掉有多难
    2020-12-05 18:15

    If you're using WSL on Windows 10 (Make sure to update to Ubuntu 16.04) the following instructions worked perfectly for me. You might need to completely wipe what you have installed however. Within bash:

    sudo apt-get update
    sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev postgresql-client-common postgresql-client libpq-dev
    

    And then to build our path and plugin directory for rbenv:

    cd
    git clone https://github.com/rbenv/rbenv.git ~/.rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    exec $SHELL
    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
    echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
    exec $SHELL
    

    Finally we come to ruby:

    rbenv install 2.4.1
    rbenv global 2.4.1
    

    Then bundler:

    gem install bundler
    rbenv rehash
    

    Now our prerequisites:

    curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
    sudo apt-get install -y nodejs
    

    And then finally Rails:

    gem install rails
    rbenv rehash
    

提交回复
热议问题