Spring doesn't work. [ uninitialized constant Spring::SID::DL ]

前端 未结 3 1719
故里飘歌
故里飘歌 2021-01-19 05:29

I Can\'t run Spring. Here is the error log.

myid-no-MacBook-Pro:myid$ spring
/Users/myid/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/spring-0.0.10/li         


        
相关标签:
3条回答
  • 2021-01-19 05:55

    This problem appears to be limited to a range of Ruby 1.9.3 patch levels, compiled on a Mac, using the Apple supplied compiler.

    • Ruby 1.9.3-p125, compiled with Apple's LLVM, Spring 1.1.3, works
    • Ruby 1.9.3-p547 (latest stable at time of writing), LLVM, Spring 1.1.3 - fails.

    I have a couple of later patches of Ruby (2.0, 2.1.2) at latest stable, LLVM. They work.

    So, at some point in the 1.9.3 series, after p125, Spring stops working when using LLVM. At some point, at least 2.0.0-p481, later Ruby versions and minor versions, and tiny versions, start working again, with LLVM. IOW, this looks like a Ruby 1.9.3 regression issue, possibly a Ruby 2.0.0 regression issue. I've documented what I've found on Github as a Spring issue.

    Right now, if you need 1.9.3 and you need Spring on a Mac... consider Zeus. ;)

    0 讨论(0)
  • 2021-01-19 05:59

    If changing the C compiler does not fix your issue this patch helped me: https://github.com/pigoz/spring/commit/11804d2fd3dce75e9b236666739cdf5b40934abd

    Simply locate the file on your system (find where spring is installed via bundle show spring) and manually make the change.

    0 讨论(0)
  • 2021-01-19 06:09

    I found out a solution.

    In my case, after changing the c compiler from clang to apple-gcc42 worked perfectly. Here are the commands I used.

    $ rbenv uninstall 1.9.3-p484
    $ which gcc-4.2
    /usr/local/bin/gcc-4.2
    $ CC=/usr/local/bin/gcc-4.2
    $ rbenv install 1.9.3-p484
    $ rbenv rehash
    

    Related link: https://github.com/rails/spring/issues/274

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