Wednesday, May 30, 2012
Tuesday, May 29, 2012
Rails 3 jquery_ujs - link_to :remote triggers two ajax calls on click
Issue: link_to :remote triggers two ajax calls on click in rails 3+
Solution: Make sure you have not included //= require jquery_ujs in the application.js file in assets since jquery-rails already handles this in rails 3.1
courtesy: link
Solution: Make sure you have not included //= require jquery_ujs in the application.js file in assets since jquery-rails already handles this in rails 3.1
courtesy: link
Rails 3 - Installing pg with native extensions
Installing pg (0.13.2) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Solution:
sudo apt-get install libpq-dev
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Solution:
sudo apt-get install libpq-dev
Tuesday, May 15, 2012
Invalid CSS issue on RAILS_ENV=production bundle exec rake --trace assets:precompile
1)Remove all the requires in app/assets/application.css file
2)Now add config.assets.precompile = ['*.css'] in application.rb file
3)Now run RAILS_ENV=production bundle exec rake --trace assets:precompile which will help to trace the exact files where the css issue exist and then fix all the issues mentioned in the css files
4) When all the css issues are fixed then remove config.assets.precompile = ['*.css'] and then revert any requires in your application.css which was present earlier and run the RAILS_ENV=production bundle exec rake --trace assets:precompile again. This should fix the issue.
2)Now add config.assets.precompile = ['*.css'] in application.rb file
3)Now run RAILS_ENV=production bundle exec rake --trace assets:precompile which will help to trace the exact files where the css issue exist and then fix all the issues mentioned in the css files
4) When all the css issues are fixed then remove config.assets.precompile = ['*.css'] and then revert any requires in your application.css which was present earlier and run the RAILS_ENV=production bundle exec rake --trace assets:precompile again. This should fix the issue.
Connecting datacard on Ubuntu 11
1) Go to -Dash home >> Network Connections
2) Select Mobile Broadband and click on "Add"
3) Select your mobile connection in dropdown >> "Continue"
4) Select your country and click on "Continue"
4) Select your service provide and click on "Continue"
5) Select your plan and click on "Apply" >> "Save"
2) Select Mobile Broadband and click on "Add"
3) Select your mobile connection in dropdown >> "Continue"
4) Select your country and click on "Continue"
4) Select your service provide and click on "Continue"
5) Select your plan and click on "Apply" >> "Save"
Tuesday, May 8, 2012
Using bundle exec in Rails 3
1)bundle exec
executes a command in the context of your bundle.That means it uses the gems specified in your Gemfile. Much of the time, running
bundle exec rake foo
has the same results as if you just ran rake foo
,
especially if you have the same gems installed systemwide as in your
Gemfile. However, some applications may specify different versions of
gems than the ones you have installed systemwide, and may want those
exact gems and versions to be able to run correctly. If you just run
without bundle exec
, you may get some weird errors.Using
bundle exec
guarantees that the program is run
with the environment specified in the gemfile, which hopefully means it
is the environment that the creators of the program want it to be run
in, which hopefully means it should run correctly no matter what weird
setup you have on your computer.It basically standardizes the environment under which the program is run. This helps avoid version hell and makes life much easier.
See http://gembundler.com/man/bundle-exec.1.html for more info.
Friday, May 4, 2012
Installing Chrome on Ubuntu
Run the following commands in terminal:
1) wget -q -O -
https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key
add -
2) sudo sh -c 'echo "deb
http://dl.google.com/linux/chrome/deb/ stable main" >>
/etc/apt/sources.list.d/google.list'
3) sudo apt-get update
4) sudo apt-get install
google-chrome-stable
Subscribe to:
Posts (Atom)