In Need of Basic Help - ruby-on-rails

QUESTION: Why am I being thrown the following line:
/Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/jrails-0.6.0/lib/jrails.rb:231:in `<module:Helpers>': uninitialized constant ActionView::Helpers::JavaScriptProxy (NameError)
ENV:
OS X 10.7
Rails 3.1.0.rc5
I have seen (spent many more hours trying to debug it myself):
Rails3 server and bundler error: uninitialized constant Bundler (NameError)
- more info available upon request
ANY IDEAS? I'm baffled.
Here is the full output from console...
dcarpenter$ rails s
/Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/jrails-0.6.0/lib/jrails.rb:231:in `<module:Helpers>': uninitialized constant ActionView::Helpers::JavaScriptProxy (NameError)
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/jrails-0.6.0/lib/jrails.rb:2:in `<module:ActionView>'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/jrails-0.6.0/lib/jrails.rb:1:in `<top (required)>'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.17/lib/bundler/runtime.rb:68:in `require'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.17/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.17/lib/bundler/runtime.rb:66:in `each'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.17/lib/bundler/runtime.rb:66:in `block in require'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.17/lib/bundler/runtime.rb:55:in `each'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.17/lib/bundler/runtime.rb:55:in `require'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.17/lib/bundler.rb:120:in `require'
from /Users/dcarpenter/Dropbox/workspace/BlueFusion/config/application.rb:9:in `<top (required)>'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc5/lib/rails/commands.rb:52:in `require'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc5/lib/rails/commands.rb:52:in `block in <top (required)>'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc5/lib/rails/commands.rb:49:in `tap'
from /Users/dcarpenter/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc5/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
dcarpenter$

How come you're using jRails? Try removing it from your life as it's no longer actively developed and I wonder if it might be the source of your problem...
jQuery is the new default thesedays anyway so your don't need jrails...

Related

Monterey OSX. `const_defined?': uninitialized constant Fog::Rackspace::CDN (NameError)

I have recently upgraded my OS. from Big sur to Montery.
When I was running my ruby application I am getting an error with careerwave
.rvm/gems/ruby-2.3.1/gems/fog-core-2.3.0/lib/fog/core/provider.rb:48:in `const_defined?': uninitialized constant Fog::Rackspace::CDN (NameError)
Can you please help in this regard, there was no change in the Gemfile or Gemfile.lock.
/Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/fog-core-2.3.0/lib/fog/core/provider.rb:48:in `const_defined?': uninitialized constant Fog::Rackspace::CDN (NameError)
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/fog-core-2.3.0/lib/fog/core/provider.rb:48:in `service_klass'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/fog-core-2.3.0/lib/fog/core/provider.rb:37:in `service'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/fog-rackspace-0.1.6/lib/fog/rackspace.rb:53:in `<module:Rackspace>'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/fog-rackspace-0.1.6/lib/fog/rackspace.rb:28:in `<module:Fog>'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/fog-rackspace-0.1.6/lib/fog/rackspace.rb:10:in `<top (required)>'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/fog-2.2.0/lib/fog.rb:42:in `<top (required)>'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/bundler/gems/carrierwave-ff89d6e1c055/lib/carrierwave/storage.rb:5:in `<top (required)>'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/bundler/gems/carrierwave-ff89d6e1c055/lib/carrierwave.rb:78:in `<top (required)>'
from /Users/rajesh.banoth/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:81:in `require'
from /Users/rajesh.banoth/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:81:in `block (2 levels) in require'
from /Users/rajesh.banoth/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:76:in `each'
from /Users/rajesh.banoth/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:76:in `block in require'
from /Users/rajesh.banoth/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:65:in `each'
from /Users/rajesh.banoth/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:65:in `require'
from /Users/rajesh.banoth/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/bundler.rb:114:in `require'
from /Users/rajesh.banoth/code/pwm/config/application.rb:7:in `<top (required)>'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/railties-4.2.11.3/lib/rails/commands/commands_tasks.rb:78:in `require'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/railties-4.2.11.3/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/railties-4.2.11.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/railties-4.2.11.3/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/railties-4.2.11.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/rajesh.banoth/.rvm/gems/ruby-2.3.1/gems/railties-4.2.11.3/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Thanks in advance.
Looks like you need to include https://github.com/fog/fog-rackspace gem also. fog-core gem doesnt have code for Rackspace.

uninitialized constant Valium::ValueOf (NameError)

I got error when i start rails project as the following error. I feel it may be because of incompatible gem version but i am not sure if it is because of Bundler gem or Valium gem. Thank in advance for the reply.
root#ip-10-152-178-228:/var/www/resource_map_sea# bundle exec rails s
/usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/valium-0.5.0/lib/valium.rb:113:in `<top (required)>': uninitialized constant Valium::ValueOf (NameError)
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
from /var/www/resource_map_sea/config/application.rb:13:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/railties-4.1.13/lib/rails/commands/commands_tasks.rb:79:in `require'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/railties-4.1.13/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/railties-4.1.13/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/railties-4.1.13/lib/rails/commands/commands_tasks.rb:76:in `server'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/railties-4.1.13/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /usr/local/rvm/gems/ruby-2.1.2#resource_map_v4/gems/railties-4.1.13/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

Getting error while running rails server

I am migrating my web app to Microsoft Azure. When I do rails s, I am getting this log:
/home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/defaults.rb:465: warning: duplicated key at line 466 ignored: :queue_type
/home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError)
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:197:in `<module:YAML>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:132:in `<top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/require_vendored.rb:4:in `<top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor.rb:40:in `require_libs'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet/vendor.rb:53:in `load_vendored'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet.rb:172:in `<module:Puppet>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/puppet-3.7.3/lib/puppet.rb:29:in `<top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:76:in `require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:72:in `each'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:72:in `block in require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:61:in `each'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler/runtime.rb:61:in `require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.0/lib/bundler.rb:133:in `require'
from /home/mnpatel0611/mapial-stage/mapial/config/application.rb:7:in `<top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /home/mnpatel0611/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Anyone face this error?
Puppatlabs describe that Puppet 3.7.3 is not supported on Ruby 2.2 but now thay change status to resolved. So you should go more into this and find rid of this problem. You can show this issue from puppatlabs ticket Puppet 3.7.3 is not supported on Ruby 2.2

bundle console fails w/ uninitialized constant Rails

I have create a new Rails engine using the rails plugin new Foobar --full --mountable command. When running bundle console I get uninitialized constant Rails Why is this?
Resolving dependencies...
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/Users/kyledecot/Desktop/Foobar/lib/foobar/engine.rb:2:in `<module:Foobar>': uninitialized constant Rails (NameError)
from /Users/kyledecot/Desktop/Foobar/lib/foobar/engine.rb:1:in `<top (required)>'
from /Users/kyledecot/Desktop/Foobar/lib/foobar.rb:1:in `require'
from /Users/kyledecot/Desktop/Foobar/lib/foobar.rb:1:in `<top (required)>'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `require'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `each'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `block in require'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `each'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/cli.rb:664:in `console'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/vendor/thor/command.rb:27:in `run'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_command'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/vendor/thor.rb:363:in `dispatch'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/vendor/thor/base.rb:438:in `start'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/cli.rb:10:in `start'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/bin/bundle:22:in `block in <top (required)>'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/bin/bundle:22:in `<top (required)>'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/bin/bundle:23:in `load'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#global/bin/bundle:23:in `<main>'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#foobar/bin/ruby_executable_hooks:15:in `eval'
from /Users/kyledecot/.rvm/gems/ruby-2.0.0-p353#foobar/bin/ruby_executable_hooks:15:in `<main>'
Adding require 'rails' in Foobar/lib/foobar/engine.rb file worked for me. I got my answer from here.

Bundler.require fails in clean Rails project

My rails app fails to load when I have the following line in application.rb:
Bundler.require(:default, Rails.env)
I get the following error:
.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/initializable.rb:13:in `[]': no implicit conversion of Symbol into Integer (TypeError)
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/initializable.rb:13:in `initialize'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/initializable.rb:85:in `new'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/initializable.rb:85:in `initializer'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#rails-4.0/gems/rolify-3.3.0/lib/rolify/railtie.rb:6:in `<class:Railtie>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#rails-4.0/gems/rolify-3.3.0/lib/rolify/railtie.rb:5:in `<module:Rolify>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#rails-4.0/gems/rolify-3.3.0/lib/rolify/railtie.rb:4:in `<top (required)>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#rails-4.0/gems/rolify-3.3.0/lib/rolify.rb:1:in `<top (required)>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `each'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `block in require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `each'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
from /Users/gerardkelly/Web Development/Rails Apps/Rails 4/po-app/config/application.rb:5:in `<top (required)>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in <top (required)>'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /Users/gerardkelly/.rvm/gems/ruby-2.0.0-p353#global/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Looks as though it's complaining about the params being sent in - which is odd because this is pre-baked Rails stuff. Note that the Bundler.require is application.rb:5 which its complaining about.
I'm on Rails 4, Ruby 2.0.0
Looks like the rollify gem you are using (so it's not clean rails project :P) has some issues in rails 4.x series.
Check this out: https://github.com/EppO/rolify/pull/218 there is a fork that already fixes that.

Resources