Tag: ruby-on-rails-3.2

Uninitialized constant QuickbooksWebConnector

I want to use QBO in my Rails 3 app, so I have used a QuickbooksWebConnector gem and written: mount QuickbooksWebConnector::Engine => “/quickbooks_web_connector” in routes.rb. I ran bundle install and started the server, but this give me the following error: uninitialized constant QuickbooksWebConnector What can I do to fix this?

Facebook gem for Rails app

Is there any ruby gem which can be used to see Facebook post in rails app, also allows to post through rails app. I tried this gem http://www.sitepoint.com/ruby-social-gems-facebook/ but it is not showing facebook page post.

when i am trying to execute rails it says 'missing_extensions?'

C:\Sites>rails new the_blog create create README.rdoc create Rakefile create config.ru create .gitignore create Gemfile create app create app/assets/javascripts/application.js create app/assets/stylesheets/application.css create app/controllers/application_controller.rb create app/helpers/application_helper.rb create app/views/layouts/application.html.erb create app/assets/images/.keep create app/mailers/.keep create app/models/.keep create app/controllers/concerns/.keep create app/models/concerns/.keep create bin create bin/bundle create bin/rails create bin/rake create bin/setup create config create config/routes.rb create config/application.rb create config/environment.rb create […]

rails s does not start my project

I have tried lot of different solutions from the web and i was unable to fix this issue. This is the error I am getting when i perform a rails s bash-3.2$ rails s => Booting WEBrick => Rails 3.2.11 application starting in development on => Call with -d to detach => Ctrl-C to […]

When I runBundle update, I get a (SyntaxError) after setting up a new rails app? Why is this happening

I’m a Rails Newbie, I’m doing the Hartl Rails Tutorial and installed with Railsinstaller C:\Sites\sample_app>bundle update C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/ dsl.rb:7:in instance_eval’: C:/Sites/sample_app/Gemfile:43: syntax error, unexp ected $end, expecting keyword_end (SyntaxError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/dsl.rb:7:inevaluate’ from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/definition.rb:17:in build’ from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler.rb:138:indefinition’ from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/cli.rb:262:in update’ from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/vendor/thor/task.rb:22:inrun’ from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/vendor/thor/invocation.rb:118:in invoke_task’ from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/vendor/thor.rb:263:indispatch’ from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22 /lib/bundler/vendor/thor/base.rb:386:in […]

How do I make friendly_id gem use an attribute from another model?

Currently using friendly_id on my messages table. Messages are accessed like this: site.com/messages/id e.g. site.com/messages/8 I’d like to use it like this: site.come/messages/username e.g. site.com/messages/terrytibbs I’ve got the gem working fine as I tested it with the “body” attribute in my messages table. Sent a short message “test” and tried to access it using site.com/messages/test […]

Display coordinates on a Google Map in Rails app

Stage: In a Rails 3.2 application, suppose I have this model: Point(id:integer, latitude:decimal, longitude:decimal, zoom:integer) Using scaffold generator, it generates a form with 3 text fields like this: <%= f.text_field :latitude %> <%= f.text_field :longitude %> <%= f.text_field :zoom %> I really don’t want to have this. I prefer to have a Google Maps map […]

Rails model – how to differentiate different types

I am currently working on a nested model form. I have a subject model. This subject model has lessons of 3 different types – tutorial, lecture and laboratory. I am able to get the nested form working with https://github.com/ryanb/nested_form. But I want to fix it such that in the form only 3 forms for the […]

What does the “bad URI(absolute but no path): http://” error in ruby on rails mean and how do I prevent it?

I’m getting the error below: bad URI(absolute but no path): http:// From view: = get_video(micropost.link) if micropost.link Helper method: def get_video(url) OpenGraph.fetch(url) end How ever if I manually place the exact same URL/Link (http://www.youtube.com/watch?v=1OLz4sr971w) from the db in place of “micropost.link” in my view there is no error. I have no idea what the issue […]

deploy:assets:precompile Issue

I am trying to deploy a rails application to the rackspace server via capistrano. I have deployed many Rails application to Rackspace and Linode server and never encountered such weird issue. The capistrano is not deploying the application and below is the log : executing `deploy:assets:precompile’ * executing “cd /home/deployer/apps/latty39/releases/20121023165957 && bundle exec rake RAILS_ENV=production […]

Ruby is the best programming language in the world - Ruby on Rails.