I am using rails 3.2 and have built an application on my development server and it is working fine. But when I deploy the same application to my heroku account I get this error:
/app/vendor/bundle/ruby/1.9.1/gems/bootstrap-sass-2.3.0.1/lib/bootstrap-sass.rb:18:in `load!': bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded (Bootstrap::FrameworkNotFound)
Does anyone know how to fix it. The bootstrap-sass gem is a dependency for the rails_admin gem.
Add this to your gemfile
gem 'less-rails'
Try this,it might work for you.I got somewhat similar error and i resolved using this.
Related
I am trying to install Camaleon CMS but getting following error:
undefined method `decorate' for #<CamaleonCms::Site:0x007f399a3beb58>
My Rails version is: 5.0.4
Ruby version is: 2.3.4
Is it the version issue, because i have read somewhere that this CMS is not compatible with higher versions of Rails like 5.0.0 and above.
I have tried to fix it but no luck!
If this happens after you define your site name, if you define it 0.0.0.0:3000 (Which was my situation), just define the site using localhost:3000.
EDIT
Also make sure to add this to your Gemfile in rails 5
gem 'draper', '~> 3'
I am trying to use the simple-captcha gem with
gem "galetahub-simple_captcha", :require => "simple_captcha".
I am running Rails 5.0.0.1 and Ruby 2.3.2.
I couldn't get it to work in my app so I created a clean skin, rails new, rails generate scaffold User, rake db:migrate etc. As soon as I add the gem, I can bundle install fine, but as soon as I run rails test or rails generate or anything I get this error:
user/.rvm/gems/ruby-2.3.3/gems/galetahub-simple_captcha-0.1.5/lib/simple_captcha/form_builder.rb:7:in `included': uninitialized constant Sprockets::Helpers (NameError)
I have tried following the setup instructions for the gem, which says to run rails generate captcha after installing the gem, but as soon as I have installed the gem I get the error.
Any help would be appreciated.
On the other hand if anyone thinks there is a better captcha I should be using for form submission, let me know.
Looks like latest commit to "simple_captcha" repository was 3 years ago. It's outdated and maybe it will be not worked with Rails 5.
You can use Recaptcha from Google https://github.com/ambethia/recaptcha
You can use Recaptcha gem as advised by Alex
There is nice tutorial for this https://www.sitepoint.com/quick-tip-add-recaptcha-to-your-rails-application/
What happens after the simple captcha is installed?
I am working on Ruby On Rails Shopify App deployed on Heroku. Suddenly error occured "uninitialized class variable ##storage in ShopifySessionRepository". I was unable to trace this.I rollback the code to previously deployed code and app worked. But now, the code which i have is with errors. So i cannot push any more code to heroku. And i cant even access the code which is working(previous code). I dont how to get out of this situation now. I am new to git, heroku and ruby on rails.Is there any way, i can access the working code using git or anything else. If not, what this error message is "uninitialized class variable ##storage in ShopifySessionRepository" and why it occurred?
I am using rails 4.0.2
This issue occurred because the the version of the shopify gem was automatically upgraded while pushing the code to heroku. Because no version was specified in the gem file for this gem, it was upgraded. The file ShopifySessionRepository was not present in the earlier version of the gem file. This was added in the latest version.
I added the older version of the gem in the gem file like this
gem 'shopify_app','~> 4.4.4'
and it worked. Now i don't know that my code was not compatible with the latest version of the gem or there is any bug in the latest version. But degrading the version solved the issue.
The bug is fixed in the current version of the shopify_app gem, 5.0.0
I installed rails on Windows7 using RailsInstaller (v2.1.0). I found the original rails was v3.2.1. After that, I "gem install spree". It seems the installation upgrades rails to v3.2.7. I mentioned that because before yesterday it was just 3.2.6. Every thing goes well under rails 3.2.6, but if I "spree install" a rails 3.2.7 app, I failed to access the default store's Cart. And get the error like this:
NoMethodError in Spree::OrdersController#edit
undefined method `password_salt=' for #<Spree::User:0x68438d0>
As I checking the database, yes, there is no "password_salt" but only "salt" in spree_users table.
Is there anyone else encountered this problem? I had taken almost half day on this problem. Did I miss something in the Spree path?
Thanks very much.
I think I had the exact same issue before, see if specifying spree gem version (assuming is 1.1.2) in the Gemfile and then running bundle update works
#Gemfile
gem 'spree', '1.1.2'
and later run
bundle update
See if it works!
I work at spree app(v. 0.70.5), but I need to install some gem which depends on spree v. 0.70.0. This app already work at production and I don't know can I rollback spree version (to 0.70.0) or not.
How I can solve this problem?
Take a look at the change log between the versions, if nothing jumps at you, try using 0.70.0
gem "spree", "0.70.0"
and test your app
Alternatively you can fork the gem that has dependency on the older version of spree and try to upgrade it