Could not find 'flat-ui.css' in any of your source paths while generating Flat UI Pro in rails app - ruby

I am integrating licensed version of flat-ui-pro with my Rails app.
For this, I am using 'designmodo-flatuipro-rails' gem
My environments are:-
OS - Windows7 32-bit
Ruby - 1.9.3p327
Rails - 4.0.0
twitter-bootstrap-rails - 2.2.8
jquery-ui-rails - 4.0.5
designmodo-flatuipro-rails - 1.1.4.2
I have generated "bootstrap_and_overrides.css" file by bootstrap generator at location "app/assets/stylesheets/". I am not using ".less" files for bootstrap.
I am also not getting Cannot detect twitter-bootstrap-rails install error
and Invalid Flat UI Pro directory error while running the flatUI generating command. It means I am inside the right FlatUI directory.
When I run the flat-ui-pro generate command rails g flatuipro:install ./FlatUI/HTML/UI/Flat-UI-Pro-1.1.4, It is throwing a error
Could not find "./FlatUI/HTML/UI/Flat-UI-Pro-1.1.4/css/flat-ui.css" in any of yo
ur source paths. Your current source paths are:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/designmodo-flatuipro-rails-1.1.4.2/lib/gener
ators/flatuipro/install/templates
I am getting the same error while passing the FlatUI directory containing PSD and HTML both.
I am not understanding why generator can not recognizing flat-ui.css in the right directory.
I used differ version of gem "designmodo-flatuipro-rails", "~> 1.2.2.0.branch" with the other version of FlatUI-Pro directory (1.2.2) but also getting the same error.
This is tree of FlatUiPro directory:-
Please reply with good suggestions.
Thanks.

Try changing your relative-path to the Flat-UI Pro Directory to "absolute" in the rails "generate" command, seems to work only for absolute paths!

After getting stuck very much, I found the solution.
I was hitting command in cmd-prompt:-
rails g flatuipro:install ./FlatUI/HTML/UI/Flat-UI-Pro-1.1.4
It will work with Mac/Ubuntu OS as creator of flatui-gem explained in the issue created on github <<Link of Github Issue>>
In Windows, it is mandatory to put the flatui directory out of the project folder.
For example:-
My FlatUIPro directory saved in "D:" drive, so my command will be
rails g flatuipro:install D:/FlatUI
or
rails g flatuipro:install D:/FlatUI/HTML/UI/Flat-UI-Pro-1.1.4

Please check your Flat UI Pro directory... you really are missing demo.css for some reason. Try re-downloading the Flat UI Pro assets from designmodo

Related

I get a LoadError when trying to about anything with a new Ruby install on Windows

I installed Ruby on Windows via RubyInstaller, with the associated DevKit.
I'm trying to run various scripts (mainly Jekyll), and I'm getting all sorts of errors about paths. For instance:
...cannot load such file -- redcarpet.so (LoadError)
Or:
...cannot load such file -- 2.0/redcloth_scan (LoadError)
Specifically, in both those cases, I'm trying to run "redcloth.bat" and "redcarpet.bat" in the bin directory of the Ruby directory.
I feel like I'm missing something basic with paths. Note that this has never worked -- I installed the RubyInstaller, then the DevKit, then the Jekyll gem...and this is what happened.
Is there something basic about this installation that I failed to set?
We ran into the RedCloth side of this error today.
We started with this error
How to install RedCloth on Windows?
What we found was we had installed the mswin32 version of RedCloth, we first got the no such file to load.
We then went to our
C:\ruby200/lib/ruby/gems/1.9.1/gems/RedCloth-mswin32
Directory , added the 2.0 file and copied the redcloth_scan.so file into the 2.0 directory.
We started getting another error that was similar.
We decided we would just uninstall the precompiled version of the gem, and start with the normal RedCloth-2.4.9.gem to be compiled locally with devkit.
Once this was installed, we again went to the lib dir for the gem.
CD C:/ruby200/lib/ruby/gems/1.9.1/gems/RedCloth-2.4.9/lib
We created a 2.0 directory
We then copied the file redcloth_scan.so file into the 2.0 directory and we no longer had the error. The server came up fine and we

How do I resolve a Cucumber 'can't load such file' warning?

I'm trying to work through 'The Cucumber Book', but Cucumber is not behaving as expected.
I'm on Windows 7 (32-bit), and I'm reasonably confident I have Ruby and the necessary gems installed properly.
However, when I run cucumber I get the following message:
WARNING: cannot load such file -- 2.0/gherkin_lexer_en
Couldn't load 2.0/gherkin_lexer_en
The $LOAD_PATH was:
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.2.1/bin/../lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.11.6-x86-mingw32/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/builder-3.2.0/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/diff-lcs-1.2.1/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.2.1/lib
This continues for a bit, listing more paths that were checked, and then a 'Reverting to Ruby lexer', and a message 'No lexer was found for en (cannot load such file --gherkin/lexer/en)...'
Based on the path it is checking it seems like it wants a '2.0' folder in the 'gherkin-2.11.6-x86-mingw32/lib' folder, which obviously doesn't exist. There are, however, '1.8' and '1.9' folders which appear to have the 'gherkin_lexer_en' file (actually 'gherkin_lexer_en.so').
As a wild guess, I duplicated the 1.9 folder and named it 2.0. I didn't really expect that would work, but figured it was worth a shot.
How do I get cucumber to look in one of the folders I have, or alternatively get a 2.0 folder in place that it will accept?
$ gem install gherkin --platform ruby
go to below folder inside your ruby installation directory
{rubyDir}\lib\ruby\gems\2.0.0\gems\gherkin-2.12.2\lib\gherkin
may be different path for you guys
Modify *lib/gherkin/c_lexer.rb:7
change the value of prefix as below:
prefix = ''
Found answer at below link
https://github.com/cucumber/gherkin/issues/273
with reply
mscharley commented on Jan 18, 2014
worked for me like charm..
On Windows, you will have to use Ruby 1.9 for the time being. There isn't a Ruby 2.0 build of gherkin published yet.
If you are using gherkin ver 2.12.1, you should be able to use cucumber with ruby 2.0 on Windows now.
 
First, install gherkin-2.12.1 with --ignore-dependencies option.
The reson --ignore-dependencies option is required is that without specifying it, it will install json 1.4.X which is very old version and fail to install on ruby 2.0.
 
At this point, you should be able to ruby cucumber on ruby 2.0, but you'll see the error message like above as warning message. This means you can still use cucumber although you are seeing the message.
 
If you want to remove the error, follow the step below.
 
create [2.0] folder on [ruby installed dir]\lib\ruby\gems\2.0.0\gems\gherkin-2.12.1\lib (This folder includes gherkin_lexer_XX.so).
copy all the contents in [ruby installed dir]\lib\ruby\gems\2.0.0\gems\gherkin-2.12.1\lib to the created [2.0] folder (you don't need to copy [2.0] folder you created).

Struggling to boot up WEBrick

First a little indication of what I'm running:
Operating System: Windows 8 64-bit
Ruby version: 1.9.3p362
Rails version: 3.2.11
I've created a new rails project called simple_cms under C:\Users\Dean\Documents\Ruby_Projects\ .
I then navigate into the project directory, so my path then is C:\Users\Dean\Documents\Ruby_Projects\simple_cms\
I then run (with my administrator command prompt)
rails server
but I then get a whole lot of errors but the most prominent one being:
The specified module could not be found some\path\mysql2\1.9\mysql2.so
Any ideas?
EDIT: Attached is my full command prompt output...
It looks like your mysql2 gem hasn't been installed correctly.
Check out the answer to this question for info on properly installing the mysql2 gem. That should take care of the rest of your errors.

RVM, FSEvents, and CarbonCore on OS X

I'm setting up a project that uses SASS, which uses FSEvents to keep from polling the disk. It seems that this doesn't play nice with RVM, however. That means that when I run sass --watch I get this warning:
Warning: Unable to load CarbonCore. FSEvents will be unavailable.
I realize that it will still work, but I don't want to be polling my disk constantly. I want to get it working with FSEvents. The best information I could find about this was this thread:
http://groups.google.com/group/compass-users/browse_thread/thread/df7d9d0da9ec1eb1
I reinstalled my RVM Ruby (using 1.9.2) as described by Brandon Mathis and downloaded the linked RubyCocoa. However, I get an error on the first step of installing RubyCocoa:
[rvm 1.9.2] ~/Downloads/RubyCocoa-1.0.0 $ ruby install.rb config --build-universal=yes
install.rb: entering config phase...
create ext/rubycocoa/extconf.rb
create framework/GeneratedConfig.xcconfig
create framework/src/objc/Version.h
create tests/Makefile
---> framework
create /Users/xxx/Downloads/RubyCocoa-1.0.0/framework/src/objc/osx_ruby.h ...
config failed
hook /Users/xxx/Downloads/RubyCocoa-1.0.0/framework/post-config.rb failed:
No such file or directory - /Users/xxx/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/x86_64-darwin10.6.0/ruby.h
try 'ruby install.rb --help' for usage
It looks like the problem stems from this being an older version of RubyCocoa (I notice the missing file has 1.9.1 in the path), but in the Google Groups post, Brandon Mathis says specifically to use the version he links and not the newest one.
Does anyone know how to get this configured, or have a link to a recent, hopefully simpler and clearer guide to getting FSEvents working with RVM?
Versions in question:
RVM 1.2.0
Ruby 1.9.2 patch level 136 (installed via RVM)
Mac OS X 10.6.6
HAML gem 3.0.25 (SASS is part of HAML)
Thanks!
I wrote FSSM, which is what HAML/SASS/Compass use for their filesystem watching backend. While rubycocoa isn't supported in 1.9.x, the latest git version of FSSM has pretty solid support for rb-fsevent. This library currently has other limitations, like only being able to monitor one path (parent directory is a must here), but I'm working on it. ;)
I'd highly suggest installing rb-fsevent, and then FSSM from github: https://github.com/ttilley/fssm
If you have any problems, please don't hesitate to file an issue in the tracker. FSSM is a currently maintained project, and it was originally written to help Chris Eppstein out with providing watch functionality in compass (which was later adopted in sass itself). Ease of use via these libraries is my absolute top priority.
This is kind of a lost battle. You can copy the contents of the include/ruby folder from the Ruby source code to that location /Users/xxx/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/x86_64-darwin10.6.0/ which will let you run the config command, but after that you will get a lot of errors on the setup command and you won't be able to install it all. People say RubyCocoa doesn't work with 1.9.2 and I don't know if anyone managed to make it work.
I tried the FSSM method above, to no avail...
Gemfile now has:
group :development do
gem 'rb-fsevent'
gem 'fssm', :git => 'https://github.com/ttilley/fssm.git'
end
which installs:
fssm (0.2.6.1)
rb-fsevent (0.4.0)
Still getting this tho:
Warning: Unable to load CarbonCore. FSEvents will be unavailable.
Anyone have install steps to make FSSM work nicely?

Ruby cannot find sqlite3 driver on windows

I am trying to set up Ruby on Rails on windows. I am using the Flash Rails distribution that looks pretty good, but there is an issue with sqlite3. I found the threads telling me to install version 1.2.3, which installed fine. I'm using ruby 1.9.0, and every time I try and run a script (e.g. rake db:create) that uses the database I get an error message "no driver for sqlite3 found".
This apparently is a missing sqlite3.dll, but I have the dll in my %PATH%, and I have also tried copying it into the directory where I am running the script from, the directory where the sqlite3 ruby code lives.
Does anyone have any ideas? If possible I want all teh ruby stuff to be self contained so I can use it from a pen drive.
EDIT: To clarify, I already used gem install to install the ruby-sqlite3 gem - it is just non functional as it cannot find the sqlite3.dll (even though it is actually present in a directory on my %PATH%)
EDIT PART 2: After doing some more digging, the problem appears that ruby will not load the sqlite3_api.dll. I have copied it all over my filesystem, I just get a failure to read file. Other dll libraries in the same directory (e.g. zlib.dll) work fine!
I tried installing the dlls into system32, and that did not work either.
The problem put simply is that sqlite3-ruby 1.2.3 is not compatible with ruby 1.9. This is caused because ruby 1.9 does not use .dll files for c libraries it uses .so files instead. Additionally, since sqlite3_api.dll is written against msvcrt-ruby18.dll. This means that it specifically only will support ruby 1.8.*.
The good news is that there is a fat binary version that will support both ruby 1.8 and ruby 1.9. Uninstalling all former versions of sqlite3-ruby and then installing this one. (You may have to manually delete some versions the gem after uninstalling.) in order to install it use
install sqlite3-ruby --source http://gems.rubyinstaller.org
for more information see this website
Try installing the sqlite3-ruby gem:
gem install sqlite3-ruby
Something similar happened to me recently so I thought I'd update my answer.
For reference there's a sqlite3_api.dll file located in the gem's lib directory. Also the sqlite3.dll file needs to be reachable on the path. They are different files, the first is required by the gem to interface Ruby to C code, while the second contains the actual Sqlite implementation.
It's best to get the second file from the sqlite website and extract it to the Ruby\bin directory (as you shouldn't manually put DLL's into the windows or windows\system directories any more).
So for reference "sqlite3_api.dll" needs to be in:
Ruby\lib\ruby\gems\1.8\gems\sqlite3-ruby-1.2.3-x86-mswin32\lib
and "sqlite3.dll" needs to be on the path, possibly in:
Ruby\bin
As for the "driver not found" problem I would suggest trying the easy things first and making sure gems is installed correctly, up to date, and that the RUBYLIB and PATH environment variables are set appropriately. (System restart may be required to propagate the changes fully.)
Re this link
Download sqlitedll-3_6_10.zip and extract into ruby/bin!
Try going to sqlite.org download page and get the zipped up dll. Then put that in your c:\windows\system32 folder, that should allow Ruby to find it.
Restart your machine after running install sqlite3-ruby
To clarify, which gem are you using? sqlite-ruby or sqlite3-ruby?
They're part of the same project, but different releases. The key is that sqlite3 appears to have driver code included.
I assume you're attempting to use the first, since it's giving me the same error. If so, try switching.
Also.. How literal do you mean by this?
but I have the dll in my %PATH%
PATH=...;C:\sqlite\sqlite3.dll
PATH=...;C:\sqlite
The first will attempt to find C:\sqlite\sqlite3.dll\sqlite3.dll, AFAIK.
I use Ruby 1.8.7 (works with 1.9.1 too)
OS is WindowsXP SP3
Go to
http://www.sqlite.org/download.html
and Download file
sqlitedll-3_7_0_1.zip (265.19 KiB)
and unzip then we will get
sqlite3.dll
Copy sqlite3.dll to your bin folder
as C:\Ruby191\bin or C:\Ruby187\bin
then it works

Resources