Flat UI Pro Can not add on Rails4.2 - twitter-bootstrap-3

I can not add Flat UI Pro to rails4.2
i usedreflection/designmodo-flatuipro-rails
but i can not
STEP1
・Flat-UI-HTML-Developers-License.zip download on Desktop
・changed folder name to flat-ui-pro
・Locate the bower.json file that unzipped with the kit, and run the following from the same directory: bower install
cd
cd Desktop
cd flat-ui-pro
cd HTML
cd UI
cd Flat-UI-Pro-1.3.2
bower install
STEP2
gem 'less-rails'
gem 'twitter-bootstrap-rails'
gem 'jquery-ui-rails'
gem 'designmodo-flatuipro-rails', '~> 1.3.2.0.branch'
gem 'therubyracer', platforms: :ruby
bundle update
and
bundle install
STEP3
bin/rails generate flatuipro:install ~/Desktop/flat-ui-pro
rake assets:clean RAILS_ENV=development
rake assets:precompile RAILS_ENV=development
STEP4
rails generate flatuipro:demo
STEP5
scaffolds.scss delete
but...collapse layout
flatuipro_demo/index
correctly layout
Example Post scaffold
select box
collapse layout
correctly layout

Why don't you try this?
HTML
<select class="form-control select select-default">
<optgroup label="Profile">
<option value="0">My Profile</option>
<option value="1">My Friends</option>
</optgroup>
<optgroup label="System">
<option value="2">Messages</option>
<option value="3">My Settings</option>
<option value="4">Logout</option>
</optgroup>
</select>
JS
$(document).ready(function(){
$('.select').select2();
});
I got it from the github issues
https://github.com/designmodo/Flat-UI-Pro-Support/issues/450

Related

Rails can't install gem sqlite

Gem files will remain installed in
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.0 for
inspection.
Results logged to
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.0/gem_make.out
An error occurred while installing sqlite3 (1.4.0), and Bundler cannot continue.
Make sure that gem install sqlite3 -v '1.4.0' succeeds before bundling.
I tried to install earlier version on sqlite, not working.
Tried one of the solutions from stackoverflow :
gem 'sqlite3', '~> 1.3.6'
getting this error
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command sqlite3,
Please help i'm new in Rails , this is my first project in rails.
Add gem 'sqlite3' to Gemfile in the root directory of your rails project. Then run bundle install and it should install sqlite and make it available to use in your rails project.
Specify git and branch for the gem sqlite3 in your Gemfile should fix the problem.
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
For more info
https://medium.com/#declancronje/installing-and-troubleshooting-ruby-on-rails-sqlite3-windows-10-fix-87c8886d03b
cannot load such file — sqlite3/sqlite3_native (LoadError) Ruby on Rails
Replace gem 'sqlite3' with gem 'sqlite3', '~> 1.3.11' which is in Gemfile in the root directory of your rails project. Then run bundle install.

Issue when pushing to Heroku. Run `bundle install` elsewhere and add the updated Gemfile.lock to version control

I've been trying to trouble shoot this error now for a couple hours without making any progress. I've tried running bundle install in different environments with no luck. I'm not sure what is happening and I feel as if the error is no longer providing relevant feedback. However, I am using Ruby 1.9.3 and when I push it states that Heroku is using ruby 2.0.0. Could this have something to do with it?
Castillos-MacBook-Pro:reservester-nysum13 castillo$ git push heroku master
Identity added: /Users/castillo/.ssh/id_rsa (/Users/castillo/.ssh/id_rsa)
Counting objects: 66, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (51/51), done.
Writing objects: 100% (66/66), 26.25 KiB, done.
Total 66 (delta 4), reused 38 (delta 1)
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* debugger
Bundler Output: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* debugger
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby/Rails app
To git#heroku.com:guarded-sierra-5306.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:guarded-sierra-5306.git'
gem 'debugger' originally was placed outside of the environment group. I moved it to the development group and reran bundle.
Here is my Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'therubyracer'
gem 'twitter-bootstrap-rails'
gem 'carrierwave'
gem 'rmagick'
gem "fog", "~> 1.3.1"
gem "devise"
gem "figaro"
gem "galetahub-simple_captcha", :require => "simple_captcha"
group :development do
gem 'annotate'
gem 'sqlite3'
gem 'rspec-rails', '~> 2.0'
gem 'debugger'
end
group :production do
gem 'pg'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
I got similar error. I tried delete Gemfile.lock file manually, rebundle, push it to git and still no luck.
But finally I make it work by change my rvm version to ruby 2.0.0, precomplie the asset with this command
RAILS_ENV=production bundle exec rake assets:precompile
and delete the Gemfile.lock, rebundle, and push it to github. Last part when you push in to heroku use your branch instead your master, this happen because you not deploying the master branch to heroku master branch with this command:
git push heroku your-branch:master
I had a similar situation. Heroku does not support every ruby version. You may be using an unsupported version.
Check for Heroku Ruby supported versions
Change your local ruby version. For example, if you are using rbenv
rbenv local 2.1.6
bundle install
Push the changes to herokugit push heroku master
You can't expect Heroku to know what version of Ruby you're running locally :-) If you want Heroku to use a particular version, tell it. Add ruby '1.9.3' to your Gemfile for example.
It also looks like you didn't rerun bundle install after putting the gem in development group? Try that.
Then add all the changes to git, commit, and push.
This problem is bacause you commit bad (old) Gemfile.lock to heroku server.
You need to update Gemfile.lock on heroku after adding/removing gems.
Do following steps:
save HEROKU_APP_NAME of existing heroku app ( HEROKU_APP_NAME.herokuapp.com )
remove heroku application from https://dashboard.heroku.com/apps and create new one
rename new heroku app to old HEROKU_APP_NAME
remove Gemfile.lock from your git repo
remove Gemfile.lock form your local project and form .gitignore (if it exist there)
run bundle install
commit changes to git repo ( new created Gemfile.lock )
run git push heroku master

Bundler groups in my Gemfile not being honered

I have
group :production, :staging do
gem "therubyracer"
end
in my Gemfile. If I run:
bundle install --without production staging test
therubyracer is added to my Gemfile.lock. Why is this happening please? I would expect it to be ignored?
For completeness, if I remove the line:
gem "therubyracer"
and run the above bundle command, then the therubyracer gem is removed from my Gemfile.lock
I think that it's supposed to be in Gemfile.lock, because bundle still needs to calculate and record all of the dependencies and such. However, running bundle install --without <group> won't actually install the gem - you can check with gem list -i therubyracer (although it may have been installed already if you ran bundle install without --without ...).

How to configure rvm with netbeans

I have installed ruby 1.9.2-p1890 in my rvm and the gem directory is
/Users/abhay/.rvm/gems/ruby-1.9.2-p180
My netbeans detected the rvm and the ruby installed but when i right click the project properies->manage
gem home is - /Users/abhay/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1
gem path is - /Users/abhay/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1
gem tool is - /Users/abhay/.rvm/rubies/ruby-1.9.2-p180/bin/gem (1.8.24)
interpreter - /Users/abhay/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
and when I run my project, I get this error
/Users/abhay/.rvm/rubies/ruby-1.9.2-p180/bin/ruby: No such file or directory -- script/server (LoadError)

Rails bundle install production only

I'm still new to rails/ruby/bundler and am a little confused.
In our config/application.rb file there's this bundler segment:
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
and in our Gemfile we use different groups, e.g.
group :development, :test do
gem "rspec-rails", ">= 2.7.0", :group => [:development, :test]
gem 'shoulda-matchers'
gem 'watchr'
gem 'spork', '~> 1.0rc'
gem 'spectator'
gem 'debugger'
gem 'wirble'
end
But when I run RAILS_ENV=production bundle install (or bundle install --deployment), it still installs gems from the development/test group...
Why does this happens or how can I make this work properly?
THIS ANSWER IS OUTDATED
Take a look at --without option:
bundle install --without development test
By default Bundler installs all gems and your application uses the gems that it needs. Bundler itself knows nothing about Rails and the current environment.
An alternative solution is to use the bundle-only ruby gem. It can be used as follows:
> gem install bundle-only
> bundle-only production
This library does not pollute your bundler configs or augment Gemfile.lock; it is a simple alternative to the built in bundle --without every other group option that bundler provides.