Resolution for undefined method `get' for nil:NilClass - phantomjs

We need some help in figuring out what we're missing from our tests. We are attempting to run headless phantomjs testing and are getting the error:
undefined method get' for nil:NilClass
Did you mean? gets
get_key
gem (NoMethodError)
features/welcome_login.feature:4:inGiven I navigate to "http://www.web.com"'
env.rb =
env file

Related

React Native pod install error: NoMethodError - undefined method `framework?' for nil:NilClass

I keep getting this error in "pod install" while the pod file is the same since last successful install! I've been having this problem for few days now.
NoMethodError - undefined method framework?' for nil:NilClass
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/target.rb:112:inbuild_as_framework?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:53:in block (3 levels) in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:53:inselect'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:53:in block (2 levels) in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:48:ineach_key'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:48:in block in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:47:ineach'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:47:in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:37:invalidate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:590:in validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:158:ininstall!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:inrun'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in'
/usr/local/bin/pod:23:in load'
/usr/local/bin/pod:23:in'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
You can delete Pods/* , Podfile.lock and retry

Trouble running Jasmine specs headless

I'm trying to get Jasmine to run in the command line (headless), but have had no success. With our current configuration:
Gemfile:
gem 'jasmine', :git => "git://github.com/pivotal/jasmine-gem.git"
gem 'jasmine-headless-webkit', :git => "git://github.com/johnbintz/jasmine-headless-webkit.git"
My current configuration of jasmine specs runs in the browser. rake jasmine:ci, however, opens a browser, and then aborts shortly thereafter with this error message:
/Users/`<me>`/.rvm/gems/ruby-2.0.0-p353/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/firefox/launcher.rb:79:in `connect_until_stable': unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError)
I looked at the github page for jasmine-headless-webkit, and saw that the project is listed as dead. So! I tried to replace the jasmine & jasmine-headless-webkit gem with jasmine-rails, and I got this error:
ERROR: TypeError: 'undefined' is not an object (evaluating 'jasmine.Matchers.prototype')
TRACE:
-> file:///Users/<me>/<myapp>/tmp/jasmine/assets/jasmine-specs.js: 711
-> file:///Users/<me>/<myapp>/tmp/jasmine/assets/jasmine-specs.js: 736
-> file:///Users/<me>/<myapp>/tmp/jasmine/assets/jasmine-specs.js: 738
-> file:///Users/<me>/<myapp>/tmp/jasmine/assets/jasmine-specs.js: 862
rake aborted!
Error executing command: "/Users/<me>/.phantomjs/1.9.7/darwin/bin/phantomjs" "/Users/<me>/.rvm/gems/ruby-2.0.0-p353/gems/jasmine-rails-0.9.0/lib/jasmine_rails/../assets/javascripts/jasmine-runner.js" "/Users/<me>/<myapp>/tmp/jasmine/runner.html?spec="
Since most users seemed to want to run their jasmine specs using phantom, as part of the 2.0 release we made that the default. The ability to run jasmine:ci with selenium was extracted into its own gem.

Heroku Logs Insight

My Ruby on Rails app was running smoothly until yesterday.
When ever I try to open my Heroku App it gives me a "Application Error" message and when I check my logs I get this message below.
[36m2013-09-10T17:42:34.393159+00:00 app[web.1]: [0m Connecting to database
specified by DATABASE_URL
[36m2013-09-10T17:42:34.846457+00:00 app[web.1]: [0m Exiting
[36m2013-09-10T17:42:34.849786+00:00 app[web.1]: [0m /app/vendor/bundle/ruby/2.
0.0/gems/devise-3.1.0/lib/devise/rails/routes.rb:440:in `raise_no_secret_key':
Devise.secret_key was not set. Please add the following to your Devise
initializer: (RuntimeError)
Has anyone encountered this? What does the error mean?
A discussion about that error here:
https://github.com/plataformatec/devise/issues/2554
Follow the error log instructions in your post. Add the following to your Devise initializer:
config.secret_key = '-- secret key --'

rails 3.2.9 bundler error

I am doing simple hello world project with rails but it seems it it throwing bundler error to me. I want to see how to remove the bundler errors that comes after i type
rails new helloproject
the errors in the console are:
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/source.rb:271:in `<class:Path>': uninitialized constant Bundler::GemInstaller (NameError)
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/source.rb:270:in `<module:Source>'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/source.rb:10:in `<module:Bundler>'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/source.rb:9:in `<top (required)>'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:21:in `initialize'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:6:in `new'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:6:in `evaluate'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build'
/usr/lib/ruby/vendor_ruby/bundler.rb:136:in `definition'
/usr/lib/ruby/vendor_ruby/bundler/cli.rb:222:in `install'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/task.rb:22:in `run'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:246:in `dispatch'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:389:in `start'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/bin/bundle:14:in `block in <main>'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
/var/lib/gems/1.9.1/gems/bundler-1.2.3/bin/bundle:14:in `<main>'
There was an error in your Gemfile, and Bundler cannot continue.
I wonder how can i get past this error and bundle the application properly?
I do manage to run the server and run the hello world app but every new project seems to throw this bundler error.
I have checked similar questions but this one seems to be unique type of the error.
How to get rid of these bundler install errors?
Check the following steps,
gem install bundler
and after adding:
gem 'bundler'
in line 2 in config/boot.rb (just after require 'rubygems')
let me know if not solved.

Assets precompile not working

Precompiling assests with RAILS_ENV=production rake assets:precompile gave error such as:
rake aborted!
undefined method `empty?' for #<File:0xc1339e8>
Stack trace :
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionView::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ThemesForRails::AssetsController instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/usr/local/rvm/rubies/ruby-1.9.3-p125-perf/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionView::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ThemesForRails::AssetsController instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionView::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ThemesForRails::AssetsController instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
** Invoke assets:precompile:nondigest (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:nondigest
** Invoke assets:environment (first_time)
** Execute assets:environment
Using: Directory Search of /home/roo/Documents/RubyApplications/REALVOLVE/Realvolve-28-Feb/public/assets
Uploading: assets/application-08d5bf8b6880620e6c8aad0f7ffbe7c2.css.gz
rake aborted!
undefined method `empty?' for #<File:0xc1339e8>
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/excon-0.10.0/lib/excon/connection.rb:211:in `request_kernel'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/excon-0.10.0/lib/excon/connection.rb:92:in `request'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/fog-0.7.2/lib/fog/core/connection.rb:20:in `request'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/fog-0.7.2/lib/fog/storage/aws.rb:323:in `request'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/fog-0.7.2/lib/fog/storage/requests/aws/put_object.rb:43:in `put_object'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/fog-0.7.2/lib/fog/storage/models/aws/file.rb:119:in `save'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/fog-0.7.2/lib/fog/core/collection.rb:50:in `create'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:117:in `upload_file'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:129:in `block in upload_files'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:127:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:127:in `upload_files'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:135:in `sync'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/asset_sync-0.2.10/lib/asset_sync/asset_sync.rb:29:in `sync'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/asset_sync-0.2.10/lib/tasks/asset_sync.rake:14:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p125-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf#realvolve/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile
Just a try ...
For newer Rails versions, you don't have to include the environment any more. Try to use
bundle exec rake assets:clean assets:precompile
Ensures that the correct version of rake is used.
Ensures that the assets were cleaned before compiling them again.
This looks to be an issue with asset_sync not Heroku or the rake assets:precompile task.
We develop asset_sync so maybe I can help. I would suggest you try the following:
Ensure your configuration for asset_sync is correct
Update asset_sync to the latest copy. Version 0.3.0
Empty your S3 assets bucket
If none of that works, please post an issue on Github and we will look into the problem further for you. We've not had any reports like this, so we may need to look at an anonymised version of your app to try and replicate the issue.
You could also ask Heroku support for help on issues like this.
Thanks to all.
I tried "bundle exec rake assets:clean assets:precompile" but still same issue.
Also asset_sync is not a problem.
I figured out that axcon gem version "0.10.0" was causing the problem. So I restricted the version to "0.9.5". It worked for me.