Path's issue with bundler, to change or not to change?

后端 未结 4 880
被撕碎了的回忆
被撕碎了的回忆 2021-01-15 02:47

I\'m trying to setup a new rails 3 project with bundler, but i ran into issues with bundler. I\'m on rails 3.0.3 with ruby 1.8.7

When trying to do

$          


        
相关标签:
4条回答
  • 2021-01-15 02:58

    Try to delete Gemfile.lock. It usually helps with

    Valid types are [:development, :runtime], not nil

    error.

    0 讨论(0)
  • 2021-01-15 03:00

    I too face the same issue and resolved it with the help of this link github:bundler

    Modified a line in the file lib/bundler/resolver.rb which is reside inside bundler gem. Remove * mark from the line d = Gem::Dependency.new(base.first.name, *reqs)

    like this:

    reqs = [dep.requirement.as_list, base.first.version.to_s].flatten.compact
    d = Gem::Dependency.new(base.first.name, *reqs)
    

    to

    reqs = [dep.requirement.as_list, base.first.version.to_s].flatten.compact
    d = Gem::Dependency.new(base.first.name, reqs)
    

    *modifying content of a gem directly is not a good practice. Posted this just to show another way to resolve this issue.

    0 讨论(0)
  • 2021-01-15 03:01

    I got the same error (I'm using rvm). It turned out that in both my .profile and .bashrc was the following statement:

    export PATH=~/.gem/ruby/1.8/bin:$PATH
    

    So this path was taken instead of the rvm path. I commented these lines out and now everything works fine

    0 讨论(0)
  • 2021-01-15 03:10

    Oh man, I just when through this today.

    I did an update, and my rvm broke -- started throwing up on missing scripts and the like. I just got finished completely reinstalling rvm and my rubies.

    it's not great, and it takes a while but it's what I did to get back to a working state.

    Started here. How can I remove RVM (Ruby Version Manager) from my system? Ended up going through and installing fresh.

    0 讨论(0)
提交回复
热议问题