uninitialized constant AFMotion::HTTP::AFFormURLParameterEncoding (NameError) - afnetworking

Recently afmotion start to rise error below, even for simple request
$ rake
Build ./build/iPhoneSimulator-6.1-Development
Build vendor/Pods
Simulate ./build/iPhoneSimulator-6.1-Development/Network.app
(main)> AFMotion::HTTP.get("http://google.com") do |result|
(main)> p result.body
(main)> end
2013-05-21 18:29:00.904 Network[75552:11303] http.rb:37:in `parameter_encoding': uninitialized constant AFMotion::HTTP::AFFormURLParameterEncoding (NameError)
from http.rb:14:in `block in included:'
=> #<NameError: uninitialized constant AFMotion::HTTP::AFFormURLParameterEncoding>
This code works several weeks ago.
Does anyone have same issue, and know how to solve this?
My version settings are below:
ruby version: 2.0.0-p195 (1.9.3-p194 also fails)
rubymotion version: 2.0
afmotion version: 0.4
AFNetworking version: 1.2.1

Related

Rails 6 - Phusion error for uninitialized constant URI::Generic

I'm using rails 6.0.3.4, ruby 2.5.0 with nginx/1.18.0 (Ubuntu). Everything was fine until I did a new deploy (using capistrano) and suddenly I'm getting Could not spawn process for application /home/deploy/appname/current: The application encountered the following error: uninitialized constant URI::Generic (NameError).
I have required these in application.rb (also tested requiring in the model) with no luck:
require 'uri'
require "uri/generic"
At this point, I'm not sure what could be wrong.
Thanks in advance if anyone has any suggestions.
It seemed it was a bug between Rails and Ruby, so I upgraded my Rails to the current stable version as well as upgraded my ruby version.

Rails 3.2 - Unable to load modules of initializers files

Environment
Ruby [1.9.3p547]
Rails [3.2.22.5]
Devise [3.0.4]
When i run any rails or rake command for this application it is giving me below error
/config/initializers/devise.rb:3:in <top (required)>': undefined
methodsetup' for Devise:Module (NoMethodError)
If i comment file devise.rb and run rails command again.
/config/initializers/doorkeeper.rb:1:in `':
uninitialized constant Doorkeeper (NameError)
And so on if i comment doorkeeper.rb file it is giving me error for
/config/initializers/kaminari_config.rb:1:in `':
uninitialized constant Kaminari (NameError)
i can't get what is issue with my application i am unable to perform any rake or rails. its directly giving me error of uninitialized constant .
The ruby and rails version is very old. I don't want to upgrade it. Earlier i though it was issue of devise gem. but it must not be issue of devise gem.
Please help me if any one has idea about this type of error.
Thanks in advance
I think you have some installation issues. Please try to install from scratch.
Follow these steps.
Find version of bundler from Gemfile.lock
Install bundler with that version and continue with bundle install
Check for API_KEY and values in your initializers.
Check for Gem support for your Ruby version (as it is too old)

Getting "uninitialized constant CarrierWave::Backgrounder (NameError)" only for some rails commands?

I'm using CarrierWave::Backgrounder and everything works on production as expected. rails s also still works in development but any other rails command (rails c, rails g, ...) do not work and fail with:
/Users/user/Sites/example/app/uploaders/avatar_uploader.rb:4:in `<class:AvatarUploader>': uninitialized constant CarrierWave::Backgrounder (NameError)
Did anyone ever have this weird problem?

RubyMotion: uninitialized constant BubbleWrap::UIAlertViewStyleDefault

I just started out with RubyMotion. I cloned a sample tweets app from https://github.com/addamh/tweetr. But when i run it, i get the following error:
$ rake
Build ./build/iPhoneSimulator-4.3-Development
Simulate ./build/iPhoneSimulator-4.3-Development/tweetr.app
2013-05-25 16:09:00.945 tweetr[30589:11103] uninitialized constant BubbleWrap::UIAlertViewStyleDefault (NameError)
Does anyone know why that could be? Am running mac osx lion (10.7.5) with XCode 4.1
Upgrading Xcode from 4.1 to 4.6.2 fixed it.

generate migration error

I try to create a standalone migration file by executing the following command:
rails generate migration LoadData
But I got the following error:
PATH-TO/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
PATH-TO/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
...
I am using Rails v2.3 and ruby Enterprise edition. Why I got this error, how to get rid of it?
This is an incompatibility between some version of Rails 2.3.xx and recent versions of RubyGems. I got this error with Rails 2.3.4 and then used a more recent version of Rails 2.3.11 as of now to get rid of this error.
In case it is not possible to update the Rails version, then in your RakeFile add in the beginning.
require "thread"
Downgrading the RubyGems version will also help. Afaik Rubygems version 1.3.5 is compatible with Rails 2.3.4 and 2.3.5.
Hope this helps.

Resources