I'm a beginner to appium, or even the language node.js or ruby. So I completely follow the tutorial when installing appium. When I ran the command arc, got the error:
/Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/2.1.0/net/http/generic_request.rb:27:in `initialize': HTTP request path is empty (ArgumentError)
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/2.1.0/net/http/request.rb:14:in `initialize'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:71:in `new'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:71:in `new_request_for'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:35:in `request'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:64:in `request'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_lib-5.0.0/lib/appium_lib/common/patch.rb:118:in `raw_execute'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:101:in `create_session'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:33:in `new'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:33:in `for'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver.rb:67:in `for'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_lib-5.0.0/lib/appium_lib/driver.rb:477:in `start_driver'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/lib/start.rb:16:in `<top (required)>'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:96:in `block in load_requires'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:95:in `each'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:95:in `load_requires'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:117:in `initial_session_setup'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:142:in `start'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:201:in `block in <top (required)>'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `call'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `block in parse_options'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `each'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `parse_options'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/lib/appium_console.rb:49:in `<module:Console>'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/lib/appium_console.rb:31:in `<module:Appium>'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/lib/appium_console.rb:30:in `<top (required)>'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/bin/arc:66:in `<top (required)>'
from /Users/kenmux/.rbenv/versions/2.1.5/bin/arc:23:in `load'
from /Users/kenmux/.rbenv/versions/2.1.5/bin/arc:23:in `<main>'
Then what should I do? Am I missing something? I just cannot get over it!
I had this same issue when I was at work and had a proxy server in my .bash_profile
Open up a terminal and type:
cat ~/.bash_profile
That will show you what is in your profile.
my .bash_profile had the below.
export http_proxy="http://127.0.0.1:8888"
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
To comment them out just add # in front of each of the lines. Then restart your terminal session.
Side Note:
When you type user$ arc from the terminal you will want to make sure you have appium running and the appium.txt file in the same directory where your running arc.
Lots of good stuff here -> Ruby_Console
I hope that helps you or someone else.
Related
I get the error below when I try to start my rails console,
/usr/lib/ruby/vendor_ruby/rails/railtie/configuration.rb:95:in `method_missing': undefined method `load_defaults' for #<Rails::Application::Configuration:0x000055af3aee4550> (NoMethodError)
from /home/alizain/www/WorkStationMetrices/config/application.rb:12:in `<class:Application>'
from /home/alizain/www/WorkStationMetrices/config/application.rb:10:in `<module:WorkstationMetrics>'
from /home/alizain/www/WorkStationMetrices/config/application.rb:9:in `<top (required)>'
from /home/alizain/www/WorkStationMetrices/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:92:in `require'
from /home/alizain/www/WorkStationMetrices/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:92:in `preload'
from /home/alizain/www/WorkStationMetrices/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
from /home/alizain/www/WorkStationMetrices/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
from /home/alizain/www/WorkStationMetrices/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
from /home/alizain/www/WorkStationMetrices/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
from /home/alizain/www/WorkStationMetrices/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from -e:1:in `<main>'
How can I fix this?
As per the error stack given , it seems like you are having issues with loading configuration during application loading.
Below mentioned link also addresses the same issue.
error "Undefinded method "load_defaults" " when trying to deploy app on Heroku
Hope it helps!!
I have been following the tutorial on how to learn Ruby On Rails basics. I have installed the latest 2.2.3 version and ran "gem install rails". I have successfully created a new project, but I have got an error when tried to run a server with "rails server" command. I received these errors:
C:\Users\Kothas\Desktop\rubyonrails\myproject>rails server
c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.r:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/ib/sqlite3.rb:6:in `rescue in <top (required)>'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/
untime.rb:76:in `require'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/
untime.rb:76:in `block (2 levels) in require'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/
untime.rb:72:in `each'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/
untime.rb:72:in `block in require'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/
untime.rb:61:in `each'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/
untime.rb:61:in `require'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.
b:134:in `require'
from C:/Users/Kothas/Desktop/rubyonrails/myproject/config/application.r
:7:in `<top (required)>'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/co
mands/commands_tasks.rb:78:in `require'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/co
mands/commands_tasks.rb:78:in `block in server'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/co
mands/commands_tasks.rb:75:in `tap'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/co
mands/commands_tasks.rb:75:in `server'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/co
mands/commands_tasks.rb:39:in `run_command!'
from c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/co
mands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
How can I fix these problems and start my application?
EDIT
I managed to fix sqlite3 errors, but the new ones showed
"cannot load such file -- nokogirl (LoadError)"
It looks like your application is having difficulty accessing your sqlite installation through the sqlite3 gem - try this answer: cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails
I am having some troubles with my Rails environment - running a command like:
$ rails generate scaffold_controller model_name
results in the following trace:
/Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/generators/generated_attribute.rb:13:in `parse': undefined method `split' for :clear:Symbol (NoMethodError)
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/generators/named_base.rb:161:in `block in parse_attributes!'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/generators/named_base.rb:160:in `map'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/generators/named_base.rb:160:in `parse_attributes!'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/generators/named_base.rb:21:in `initialize'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/generators/resource_helpers.rb:18:in `initialize'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/thor-0.18.1/lib/thor/group.rb:227:in `new'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/thor-0.18.1/lib/thor/group.rb:227:in `dispatch'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/generators.rb:171:in `invoke'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/commands/generate.rb:12:in `<top (required)>'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/me/.rvm/gems/ruby-1.9.3-p392#myproject/gems/railties-3.2.13/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
As nothing in the trace seems to even be from my specific project, I'm a little stumped as to what could be going on. As you can see, I'm running rails 3.2.13 on an rvm-installed ruby 1.9.3.
Any ideas?
I had the same problem. it turns out that I had following line somewhere in my code.
include Term::ANSIColor
This code is needed for colorised Term output. But it is fine to comment it out temporarily when you need to generate or destroy scaffolds. The method or symbol 'clear' conflicts with other gems. So this probably fixes rake:erd as well.
I am on Mac OSX lion and am new to Ruby on Rails programming, so bear with me.
I'm trying to work on a teammates' Ruby on Rails app, but it requires that I have PostgreSQL installed. I installed it with Postgres.app (version 9.2.2). However, when I run rails server, I get the following error.
/Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require': dlopen(/Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/pg-0.14.1/lib/pg_ext.bundle, 9): Library not loaded: /usr/lib/libpq.5.dylib (LoadError)
Referenced from: /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/pg-0.14.1/lib/pg_ext.bundle
Reason: image not found - /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/pg-0.14.1/lib/pg_ext.bundle
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/pg-0.14.1/lib/pg.rb:4:in `<top (required)>'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
from /Users/kevin/Documents/photowhoa/config/application.rb:13:in `<top (required)>'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:53:in `require'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
from /Users/kevin/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I've already tried uninstalling and reinstalling the PG gem. If anyone can help me, that would be extremely appreciated.
Same problem. Rake can't find Postgres library.
This fixes the problem:
export DYLD_LIBRARY_PATH=/Library/PostgreSQL/9.2/lib
Adjust path to lib to match yours.
I'm on Ruby 1.9.3 and Rails 3.0.11. I recently installed Draper(0.12.0) gem, but I'm unable to run its generators. I get the following error when I try to run the generator on the Post model :-
rails generate decorator Post
/home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `config' for nil:NilClass (NoMethodError)
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/draper-0.12.0/lib/draper/railtie.rb:6:in `block in <class:Railtie>'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/railtie.rb:189:in `call'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/railtie.rb:189:in `each'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/railtie.rb:189:in `load_generators'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/application.rb:147:in `block in load_generators'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/application/railties.rb:11:in `each'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/application/railties.rb:11:in `all'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/application.rb:147:in `load_generators'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/generators.rb:319:in `load_generators_from_railties!'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/generators.rb:278:in `lookup'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/generators.rb:141:in `find_by_namespace'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/generators.rb:161:in `invoke'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/commands/generate.rb:10:in `<top (required)>'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `require'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `block in require'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:593:in `new_constants_in'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `require'
from /home/mohnish/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.11/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any inputs, on how can I debug this would be really helpful.
Thank you.
The Problem is this section in v0.12.0 (the one you are using) https://github.com/drapergem/draper/blob/v0.12.0/lib/draper/railtie.rb#L5-L8
When I look at the master branch they changed to code to look like: https://github.com/drapergem/draper/blob/master/lib/draper/railtie.rb#L5-L10
You should upgrade your draper gem to the latest release and see if the error still occurs.