Do I need to use CoffeeScript instead of JS in a Rails 3.1 app? The same goes for SASS and CSS.
thanks
No you don't. Just remove the coffeescript and sass gems in the Gemfile and you are good to go.
Related
I have made a mountable plugin using haml as template. I have added haml and haml-rails in my gemspec.
I use it in a project, I add it in my Gemfile as follows:
gem 'my_plugin', :git=> "git#github.com:lishoubo/my_plugin.git"
after execute bundle install, I see the haml and haml-rails have been installed.
But when I start the server, It prompts error:
Missing template
It seems the the project can not load haml gem event it install them. I guess it because the haml gems are installed for plugin not for the project. So I add haml and haml-rails to project Gemfile. It dose work.
However, I do not think it needs to add haml gem "again" to project Gemfile. Because I use a plugin, and this plugin uses haml, why I should add it to my Gemfile?
Does anyone know why?
I am using jQuery datepicker gem in a Rails 3.2.x app and the calendar looks like there is no CSS applied to it.
I have required all jQuery related JS files in my application.js
//= require jquery
//= require jquery_ujs
//= require jquery-ui
I also followed the simple instructions in the ReadME for the gem.
I was under the impression that once I required it in my application.js, then everything should be included.
What am I missing?
This is because you're not including the CSS assets as well. Simply including the JavaScript assets is not enough to get it styled.
As the jquery-rails README states:
In order to use the themed parts of jQuery UI, you will also need to supply your own theme CSS (or use the jquery-ui-rails gem mentioned above).
we are using prawn to generate pdf file in our rails 3 app. Now after upgrading to rails 3.2.8, there is a problem with rails plugin prawnto. Here is the errror:
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them o
ut and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes
for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at D:/rails_proj/
emclab-failed2/config/environment.rb:5)
DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases,simply use Ruby memoization pattern inst
ead. (called from extend at D:/rails_proj/emclab-failed2/vendor/plugins/prawnto/lib/prawnto/template_handler/compile_support.rb:5)
D:/rails_proj/emclab-failed2/vendor/plugins/prawnto/lib/prawnto/template_handlers/base.rb:3:in `<module:TemplateHandlers>': uninitialized co
nstant ActionView::TemplateHandler (NameError)
Even rails server can not be started. Is there a way to fix this problem? thanks.
Prawn is a ruby gem and is not depending on prawnto to work with rails. Here is a post by aniket to use prawn directly in rails 3.2. We followed the instruction and it works in rails 3.2.8 as well. Check it out if you have the same compatible issue with prawnto.
In the context of a rails 3.2 rails with backbone, can sprockets and requireJs works together? cannot figure it out myself or find on the web.
I think you want to use sprockets OR requirejs, but not both. There is a gem for easy use of requirejs in rails (https://github.com/jwhitley/requirejs-rails/).
I am working on a project in Ruby 1.9.2 and Rails 3 and I am looking for a gem to send push notifications to my iOS app and to my Android app.
I have found one for iOS jtv-apns gem but as I have asked in this question, I haven't been able to make it work and I haven't received any answers yet.
I have also found apn_on_rails but as the instructions are not for rails 3, I don't know if it is compatible.
For android, all I have found is c2dm_on_rails so far, but only works with ruby 1.8 and rails 2.
As suggested in this question, Urban ship is not an option for me right now. I would like to implement it myself or find a gem to help me do that.
Do you know any gem I can use for ruby 1.9 and rails 3 or a good tutorial I can follow?
I ended up using apn_on_rails the rails 3 branch. You can find a really good tutorial here
And for android I used speed_c2dm
Use Prowl iOS client and
prowler gem
http://www.prowlapp.com
If someone knows a better solution that is up2date please post as comment!