When you try to replace prototype with jquery in your Rails 3.0.x application, by using the command described in the Agile Web development book:
rails generate jquery:install --ui --force
you get the following error:
Could not find generator jquery:install
You would need to follow the steps below:
- Add gem “jquery-rails”, “~> 1.0.13” in your Gemfile, and run bundle install
- run the command described above: rails generate jquery:install –ui –force
Now you should be able to see something like:
copying jQuery (1.6.2)
copying jQuery UI (1.8.14)
copying jQuery UJS adapter (cd619d)
You have an edit form that displays a value in a format (ie dates) that you want to modify by using a helper method (ie display_datetime).
According to the suggestion here, you can use the following in your view:
<%= f.text_field :date_field_to_format, :value => display_datetime(f.object.date_field_to_format) %>
After installing SL4A_r4 (Scripting Layer for Android), on your Android phone, and before installing any interpreters every time you start your SL4A app, it keeps crashing after a few seconds.
If you install an interpreter (ie JRuby), then the application stops crashing.
You would need to be quick to start the installation before the application crashes, by doing the following:
Settings -> View -> Interpreters -> Settings -> Add and then select the interpreter you would like.
You are following the steps described in the book ‘Hello, Android’, but when you try to change the interface in section 3.3 ‘Creating the Opening Screen’, and try to run the application in either the emulator or the phone you get the following error message in the eclipse console:
/lib/libz.so.1: no version information available...
You will need to make sure that you add the needed strings, i.e (main_title, continue_label, new_game_label, about_label and exit_label) in the Sudoku/values/strings.xml file, which is described in page 51, but is not clear that you have to do that before running the app. So your strings.xml file should look like:
<?xml version="1.0" encoding="utf-8"?>
<string name="main_title">Android Sudoku</string>
<string name="new_game_label">New Game</string>