我最近卸载了Xcode 4.2并重新安装了Xcode 4.3.1.命令行工具已安装.然后,我使用macports.org中的Lion"dmg"磁盘映像安装了MacPort.因为,我sudo: port: command not found在每次使用端口之后都得到了,我按照这个和这个帖子来创建一个.bash_profile文件(之前没有出现),然后输入以下内容但无济于事.
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
Run Code Online (Sandbox Code Playgroud)
关注这篇文章
? ~ git:(master) ? rvm install 1.8.7 --with-openssl-dir=/opt/local
You requested building with '/usr/bin/gcc-4.2' but it is not in your path.
? ~ git:(master) ? vi .rvmrc
rvm_archflags="-arch x86_64"
export CC="/usr/bin/gcc-4.2"
export CFLAGS="-O2 -arch x86_64"
export LDFLAGS="-L/opt/local/lib"
export CPPFLAGS="-I/opt/local/include"
Run Code Online (Sandbox Code Playgroud)
重命名.bash_profile为.profile
? ~ git:(master) ? vi .bash_profile
? ~ git:(master) ? mv .bash_profile .profile
? ~ …Run Code Online (Sandbox Code Playgroud) public enum MyUnits
{
MILLSECONDS(1, "milliseconds"), SECONDS(2, "seconds"),MINUTES(3,"minutes"), HOURS(4, "hours");
private MyUnits(int quantity, String units)
{
this.quantity = quantity;
this.units = units;
}
private int quantity;
private String units;
public String toString()
{
return (quantity + " " + units);
}
public static void main(String[] args)
{
for (MyUnits m : MyUnits.values())
{
System.out.println(m.MILLSECONDS);
System.out.println(m.SECONDS);
System.out.println(m.MINUTES);
System.out.println(m.HOURS);
}
}
}
Run Code Online (Sandbox Code Playgroud)
这是指post ..wasnt能够回复或评论任何如此创建的新的.为什么是我的
System.out.println(m.MILLSECONDS);
Run Code Online (Sandbox Code Playgroud)
发出警告 - 静态字段MyUnits.MILLSECONDS应该以静态方式访问?谢谢.
我想Capybara在我的代码中有不同的等待时间,具体取决于它们通常需要多长时间才能完全加载?我是否必须重复改变Capybara.default_wait_time或者有更好的方法吗?
我检查了所有其他类似的答案,没有一个与我的完全一样,这些解决方案都没有为我工作.
gem environment并sudo gem environment给出相同的结果:
RubyGems Environment:
- RUBYGEMS VERSION: 1.5.3
- RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /home/ava/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Run Code Online (Sandbox Code Playgroud)
rvm -v : rvm …
我想在我的终端上运行mysql客户端.我已经安装了最新的mysql gem.
? ~ git:(master) ? ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
? ~ git:(master) ? rails -v
Rails 2.3.14
? ~ git:(master) ? which mysql
mysql: aliased to nocorrect mysql
? ~ git:(master) ? which ruby
/usr/bin/ruby
? ~ git:(master) ? which rails
/usr/bin/rails
? ~ git:(master) ? gem list
*** LOCAL GEMS ***
actionmailer (2.3.14)
actionpack (2.3.14)
activerecord (2.3.14)
activeresource (2.3.14)
activesupport (2.3.14)
builder (2.1.2)
bundler (1.0.21)
capistrano (2.9.0)
capybara (0.3.9)
cgi_multipart_eof_fix (2.5.0)
childprocess (0.2.2)
columnize …Run Code Online (Sandbox Code Playgroud) 我正在修改Ruby中的YAML文件.在我回写修改后的YAML后,我看到---文件顶部已添加.这是如何添加的,我该如何摆脱它?
我正在尝试使用Tomcat 7.0.22中的管理器应用程序登录Mac OS X 10.7.这是我得到的错误:http://f.cl.ly/items/421q1K3f1i0X1H1M181v/so.tiff
401 Unauthorized
You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.
For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
Run Code Online (Sandbox Code Playgroud)
我已经在我的tomcat-users.xml中添加了这个,仍然没有使用相同的用户名/密码.
<tomcat-users> …Run Code Online (Sandbox Code Playgroud) 我正在尝试运行users_test.rb刚刚拥有的文件
test "the truth" do
assert true
end
Run Code Online (Sandbox Code Playgroud)
我确实有一个喜欢的桌子,我仍然得到这个错误.为什么这样?
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
? channelappnew rake db:test:clone
? channelappnew rake db:test:clone_structure
? channelappnew rake db:migrate
? channelappnew rake db:test:load
? channelappnew rake db:test:prepare
? channelappnew rake db:test:purge
? channelappnew ruby -Itest test/unit/user_test.rb
Loaded suite test/unit/user_test
Started
E
Error:
test_the_truth(UserTest):
ActiveRecord::StatementInvalid: Could not find table 'likes'
Finished in 0.058371 seconds.
1 tests, 0 assertions, 0 failures, 1 …Run Code Online (Sandbox Code Playgroud) ? expertiza git:(master) ? ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0]
? expertiza git:(master) ? rails -v
Rails 2.3.14
? expertiza git:(master) ? script/server
/Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/inflector.rb:3:in `require': no such file to load -- iconv (LoadError)
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/inflector.rb:3
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext/integer/inflections.rb:1:in `require'
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext/integer/inflections.rb:1
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext/integer.rb:2:in `require'
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext/integer.rb:2
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext.rb:8:in `require'
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext.rb:8
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext.rb:8:in `each'
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext.rb:8
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support.rb:56:in `require'
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support.rb:56
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/rails-2.3.14/lib/commands/server.rb:1:in `require'
from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/rails-2.3.14/lib/commands/server.rb:1
from script/server:3:in `require'
Run Code Online (Sandbox Code Playgroud)
我试过安装
rvm pkg install readline
rvm pkg install iconv
rvm …Run Code Online (Sandbox Code Playgroud) 我最近卸载了Xcode 4.2并重新安装了Xcode 4.3.1.Command Line Tools也安装了.错误说"C编译器不起作用".在搜索此错误时,它表示在未安装Xcode时会发生这种情况.我错过了什么?
rvm install 1.9.3 --with-gcc=clang
Installing Ruby from source to: /Users/ava/.rvm/rubies/ruby-1.9.3-preview1, this may take a while depending on your cpu(s)...
ruby-1.9.3-preview1 - #fetching
ruby-1.9.3-preview1 - #extracting ruby-1.9.3-preview1 to /Users/ava/.rvm/src/ruby-1.9.3-preview1
ruby-1.9.3-preview1 - #extracted to /Users/ava/.rvm/src/ruby-1.9.3-preview1
Fetching yaml-0.1.4.tar.gz to /Users/ava/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/ava/.rvm/src
Configuring yaml in /Users/ava/.rvm/src/yaml-0.1.4.
ERROR: Error running ' ./configure --prefix="/Users/ava/.rvm/usr" --with-gcc=clang --build=x86_64-apple-darwin11.3.0 --host=x86_64-apple-darwin11.3.0 --build=x86_64-apple-darwin11.3.0 --host=x86_64-apple-darwin11.3.0 ', please read /Users/ava/.rvm/log/ruby-1.9.3-preview1/yaml/configure.log
Compiling yaml in /Users/ava/.rvm/src/yaml-0.1.4.
ERROR: Error running '/usr/bin/make ', please read /Users/ava/.rvm/log/ruby-1.9.3-preview1/yaml/make.log
Installing …Run Code Online (Sandbox Code Playgroud)