rubygems

Using selenium and Appium is it possible to change between wifi networks?

瘦欲@ 提交于 2019-12-21 20:59:30
问题 Using: selenium webdriver, rubygems, appium, android and ios devices The app I am testing has a button which becomes enabled only when connected to a specific wireless network. I'd like to create a script which will check if the button is active or not vKioskStatus = element.enabled? puts(vKioskStatus) If it is not active, then I'd like to change wifi networks. Is that possible to automate changing networks on a mobile device? UPDATE I'm receiving the following error when trying to use

`autoload` raises an error but `require` does not (ruby)

非 Y 不嫁゛ 提交于 2019-12-21 20:35:55
问题 In my Ruby program, I'm trying to lazy-load a library (crack for the curious). If I do this: require 'rubygems' require 'crack' Everything is working fine. However, when I try this: require 'rubygems' autoload :Crack, 'crack' A LoadError is raised. ( no such file to load -- crack ) Why is this error being raised? Is it because 'crack' (and therefore my other user-installed gems) are not in my $LOAD_PATH? edit: Furthermore, autoload does work with the Standard Library: autoload :Yaml, 'yaml'

Error when run “gem install rails”

寵の児 提交于 2019-12-21 17:49:18
问题 My configuration: Operating System: Ubuntu 12.04 rvm version: 1.25.14 ruby version: 2.1.0p0 gem version: 2.2.1 $ which ruby /home/tauhidul35/.rvm/rubies/ruby-2.1.0/bin/ruby $ which rvm /home/tauhidul35/.rvm/bin/rvm $ which gem /home/tauhidul35/.rvm/rubies/ruby-2.1.0/bin/gem $ which bundle /home/tauhidul35/.rvm/gems/ruby-2.1.0@global/bin/bundle Now when I run command, I get error: $ gem install rails ERROR: While executing gem ... (NoMethodError) undefined method `ord' for nil:NilClass If I

An error occurred while installing libv8 (3.11.8.13), and Bundler cannot continue

梦想的初衷 提交于 2019-12-21 17:18:21
问题 After run bundle install I get this error: Gem::Package::FormatError: no metadata found in /Users/jeanosorio/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gem An error occurred while installing libv8 (3.11.8.13), and Bundler cannot continue. Make sure that `gem install libv8 -v '3.11.8.13'` succeeds before bundling. I try with gem install libv8 -v '3.11.8.13' But I get ERROR: Error installing libv8: invalid gem format for /Users/jeanosorio/.rvm/gems/ruby-1.9.3-p286/cache

Installing gems from behind a corporate firewall

我们两清 提交于 2019-12-21 12:18:14
问题 I suspect that the corporate firewall is preventing gems from getting installed. I have HTTP_PROXY defined and I'm able to view remote gems via the following command: jruby -S gem list -r But when I go to install a gem, I get a 404: jruby -S gem install rails Is there a good workaround for resolving this issue other than maintaining an internal gem repository? 回答1: for ruby gems, placing this in my gem.bat this works for me @"%~dp0ruby.exe" "%~dpn0" %* --http-proxy http://domainname.ccc.com

Making a custom plugin/gem/engine for Rails 3 app

帅比萌擦擦* 提交于 2019-12-21 11:36:27
问题 I am following the guide http://edgeguides.rubyonrails.org/plugins.html and it seems to be slightly outdated. Could you have a look on it and tell me which sections should be done in a different way in Rails 3? EDIT1: Links to alternative tutorials are also very welcome! 回答1: You're right, that guide isn't the best (the last changelog entry is April 2010). Instead, I'd recommend you read: https://github.com/radar/guides/blob/master/gem-development.md 回答2: I bumped into this question, and the

pg gem Trace/BPT trap: 5 error on MAC OS X lion

戏子无情 提交于 2019-12-21 09:17:34
问题 I recently upgraded my snow leopard to lion and in one of my apps i get => Booting WEBrick => Rails 3.0.4 application starting in development on http://0.0.0.0:4000 => Call with -d to detach => Ctrl-C to shutdown server [2011-08-16 17:47:27] INFO WEBrick 1.3.1 [2011-08-16 17:47:27] INFO ruby 1.9.2 (2011-07-09) [x86_64-darwin11.0.0] [2011-08-16 17:47:27] INFO WEBrick::HTTPServer#start: pid=3460 port=4000 Trace/BPT trap: 5 the app quits and there is no other output , it does run with sqlite3 as

Why doesn't the 'bundle install --without production' command not require '--without production' after update?

爱⌒轻易说出口 提交于 2019-12-21 07:54:49
问题 Why doesn't the second command of $ bundle install not need --without production (As this is how it went in a tutorial, so I assume its correct) What is happening/reasoning behind it not being needed? From http://ruby.railstutorial.org/chapters/a-demo-app#sec-demo_users_resource $ bundle install --without production $ bundle update $ bundle install 回答1: I believe it's because bundler creates a .bundle/config file inside your project's folder. This file stores the --without production option

Can't update RubyGems

安稳与你 提交于 2019-12-21 07:44:47
问题 I'm having difficulties updating RubyGems from version 1.1.1 to newest. I've tried the following: gem update Result: Updating installed gems Bulk updating Gem source index for: http://gems.rubyforge.org/ Nothing to update and gem install rubygems-update Result: Bulk updating Gem source index for: http://gems.rubyforge.org/ Bulk updating Gem source index for: http://gems.rubyforge.org/ ERROR: Error installing rubygems-update: rubygems-update requires builder (>= 0) and gem install rubygems

Can't update RubyGems

99封情书 提交于 2019-12-21 07:43:32
问题 I'm having difficulties updating RubyGems from version 1.1.1 to newest. I've tried the following: gem update Result: Updating installed gems Bulk updating Gem source index for: http://gems.rubyforge.org/ Nothing to update and gem install rubygems-update Result: Bulk updating Gem source index for: http://gems.rubyforge.org/ Bulk updating Gem source index for: http://gems.rubyforge.org/ ERROR: Error installing rubygems-update: rubygems-update requires builder (>= 0) and gem install rubygems