小编Nat*_*son的帖子

无法启动Git Bash

无法启动Git Bash,无法确定堆栈中的错误发生在哪里.运行Windows 10,Git Bash,ConEmu和Vagrant.

当我通过ConEmu或应用程序直接启动Git Bash时,我收到以下消息:

0 [main] bash 4696 fork: child 528 - died waiting for dll loading, errno 11
bash: fork: retry: No child processes
1263234 [main] bash 4696 fork: child 684 - died waiting for dll loading, errno 11
bash: fork: retry: No child processes
3519490 [main] bash 4696 fork: child 2020 - died waiting for dll loading, errno 11
bash: fork: retry: No child processes
7764494 [main] bash 4696 fork: child 7064 - died waiting for …
Run Code Online (Sandbox Code Playgroud)

windows git bash vagrant conemu

22
推荐指数
3
解决办法
9412
查看次数

意外的rspec行为

学习Rspec,只使用Ruby,而不是Rails.我有一个脚本,从命令行按预期工作,但我无法通过测试.

相关代码:

  class Tree    
  attr_accessor :height, :age, :apples, :alive

  def initialize
    @height = 2
    @age = 0
    @apples = false
    @alive = true
  end      

  def age!
    @age += 1
  end
Run Code Online (Sandbox Code Playgroud)

规范:

describe "Tree" do

  before :each do
    @tree = Tree.new
  end

  describe "#age!" do
    it "ages the tree object one year per call" do
      10.times { @tree.age! }
      expect(@age).to eq(10)
    end
  end
end
Run Code Online (Sandbox Code Playgroud)

而错误:

  1) Tree #age! ages the tree object one year per call
     Failure/Error: expect(@age).to eq(10)

       expected: 10 …
Run Code Online (Sandbox Code Playgroud)

ruby rspec

5
推荐指数
1
解决办法
90
查看次数

java.lang.IllegalStateException:找不到支持的数据源类型

Spring Boot 无法创建我的 Postgres 数据源。错误从这里开始:

at org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder.getType(DataSourceBuilder.java:138) ~[spring-boot-autoconfigure-1.5.7.RELEASE.jar:1.5.7.RELEASE]
Run Code Online (Sandbox Code Playgroud)

最终抛出错误:

Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: No supported DataSource type found
Run Code Online (Sandbox Code Playgroud)

我已经使用 xml 配置和 Maven 构建了 Spring Apps,但 Spring Boot 和 Gradle 对我来说是新的。我习惯于@Autowire从配置文件中提取数据源。基于一些SO答案,我添加了一个数据库配置类:

import javax.sql.DataSource;

import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.PropertySource;

@Configuration
@PropertySource({ "classpath:application.properties" })
public class DatabaseConfig {

    @Bean
    @Primary
    @ConfigurationProperties(prefix = "spring.datasource")
    public DataSource …
Run Code Online (Sandbox Code Playgroud)

eclipse postgresql jdbc spring-boot

5
推荐指数
2
解决办法
2万
查看次数

标签 统计

bash ×1

conemu ×1

eclipse ×1

git ×1

jdbc ×1

postgresql ×1

rspec ×1

ruby ×1

spring-boot ×1

vagrant ×1

windows ×1