我在Ruby中遇到MySQL查询问题.我使用'mysql'宝石.
配置存储在单独的yml文件中并加载到@conf变量中.这是我的代码:
# connect to the database
Mysql::new(@conf['sql_host'], @conf['sql_user'], @conf['sql_password'], @conf['sql_base'])
# it's ok when we're doing this
my.query("SELECT * FROM `my_table`") do |e|
# code
end
# Maybe, I've missed something here...
# really this query will insert value into other table, used SELECT just for testing
# this throws exception: 'query: not connected'
my.query("SELECT * FROM `my_table_2`")
Run Code Online (Sandbox Code Playgroud)
Windows XP
ruby 1.8.6(2008-08-11 patchlevel 287)[i386-mswin32]
mysql(
2.8.1,2.7.3 )MySQL客户端版本:5.0.51a
第二个查询抛出'查询:未连接'.
这是经验丰富的Git用户非常简单的问题.我在git托管上创建了存储库并设置了我的pc:
git init
git remote add origin git@*.sourcerepo.com:*/ *.git
Run Code Online (Sandbox Code Playgroud)
然后,经过一些改变,我做了:
git add .
git commit
git push
Run Code Online (Sandbox Code Playgroud)
所有这些操作都在第一台开发者电脑上完成.
现在问题是:第二个开发人员如何访问并对repo进行更改?首先,他必须克隆回购?