Im trying to start my rails application on ubuntu 11.10, but im hitting the following error:
<PROJECT_PATH>/vendor/cache/ruby/1.8/gems/mysql2-0.2.13/lib/mysql2/mysql2.so: invalid ELF header - <PROJECT_PATH>/vendor/cache/ruby/1.8/gems/mysql2-0.2.13/lib/mysql2/mysql2.so
Im running this in a virtual machine (host: Windows 7, guest: Ubuntu 11.10) if that makes a difference.
Ive pulled out half the hair on my head, any help would be much appreciated.
Im quite embarrassed, but just in case there is someone else out there and faces something like this because of his/her stupidity,
the error was because the folder was being shared between windows and linux, and bundler had been run on windows earlier. When on ubuntu, the earlier installed windows libraries were being picked up, instead of the native linux ones. Cleaning the vendor/cache fixed the issue
Similarly to #zsquare's answer I encountered the same problem when copied a whole deployed project from 32-bit Ubuntu machine to 64-bit.
Unfortunately his answer didn't help, but my solution was even easier: just deleted the whole project and re-deployed it again.
Related
I'm working on Win10 64bit with Qt5.10.1, VS2017, MySql 8.0(64it). Everything is fine in my computer. After I deploy my application on other computers, a error message "Driver not load" pop up.
I have checked many forums including two posts in stackoverflow, [Qt][QMYSQL] Deployed app - Driver not loaded
Deploying qt mysql application
But it doesn't work for me. The following are the dll files in my folder:
qsqlmysql.dll is included in the folder sqldrivers.
All of the platform, software, SDK are 64 bit. can anyone help me? thanks.
Thanks everyone who answer my question. I tried many methods and almost give up. I never used MySQL before and this time I choose the newest MySql 8.0.12. I ignore the procedure and post the solution directly:
Beside libmysql.dll and qsqlmysql.dll, other two *.dll files are also necessary (but no solution I searched refers to them): libeay32.dll and ssleay32.dll, they are located at MySql/bin/. For my computer, they are contained in the system path, while for other computers that do not install MySql, they lack these two. Thus, we need to copy them to the package as well.
For anyone who encounter the same problem, for example using the newest MySql 8.0, you can try this method.
I built a qt application that connects and queries a database using mysql . it works perfectly fine on my development computer (the computer with Qt Creator on it). but when I deploy it using windeployqt.exe and run it on another computer it doesn't connect to the database for some odd reason.
Note that I do have a working database (mysql as well) on the other computer (the one that fails to connect to the database)
I'm not sure what to do, I tried using addLibraryPaths but it didn't work (I'm not even sure if I did it correctly).
I'm using :
mysql server 5.5.36
workbench 6.0
Qt Creator 5.4.0
I also tried looking into statically building my application but I failed to understand the procedures in doing so.
I would greatly appreciate it if any of you Qt gods could help with this.
i finally found the problem and solved it.
problem: for some reason the target computer wasnt recognizing or reading libmysql.dll in C:\Windows ,and thanks to #Marco i used db.LastError and got my application to display the error , it was "Driver not Loaded Driver not Loaded" which meant that there was something wrong with libmysql.dll (note i copied this dll from MySql folder installed on the target machine )
Solution : i had to copy libmysql.dll from my development machine and place it in C:\Windows on the target machine (i noticed that libmysql.dll on my target machine was smaller in size than the one i used on my development machine)
for some reason the program only operates when the libmysql.dll from the development machine is present in C:\Windows in the target machine
this solution should fix any "Driver not loaded" or "QMySQL driver not loaded "(etc) errors . thanks everyone for trying to help , thanks again #Macro
I assume you built your application in release mode instead of debug mode.
If you have libmysql.dll and qsqlmysql.dll alongside your executable. Create a directory/folder and name it sqldrivers. Place qsqlmysql.dll in the directory you created and deploy it alongside your executable.
PS: I didn't see nnb's comment earlier. I think he's saying the same thing as my answer
From the comment we have cleared that there is a problem loading the driver, I am confident that you have the put qsqlmysql.dll in the correct place, as you have used the deploying utility, so I suspect that the problem is qsqlmysql.dll needs another dll that cannot be found in the system path.
I suggest that you run this tool:
http://www.dependencywalker.com/ on the qsqlmysql.dll
That will help you finding out what is missing, when you find that out, you will probably have to modify the system path or to install a dll that is missing.
I know this thread is old, but I've been having the same issue, and the solution was very easy (once you know).
The problem is that when you execute your application inside Qt, it will find the needed dll to load the drivers (libmysql.dll) if you located it in the correct Qt folder (Qt/path_to_compiler/bin), in my case: C:\Qt\5.9.1\msvc2017_64\bin. But when you try to execute the deployed executable, it is not able to find it. You will notice that the problem is solved if you paste the dll in C:\Windows, as #Nelioussness said. But that's not the solution, as it won't work in a different computer.
Just go to MySQL installation folder and look for the file libmysql.dll if you didn't do it before. In my case, it was located in C:\Program Files\MySQL\MySQL Server 5.7\lib. Once you find it, copy it to your release folder, exactly at the same level as the executable. It didn't work for me when I put it inside 'sqldriver' folder and everything was solved by just putting it outside, next to the .exe
Hope this helps :)
I am stuck at the moment and need some help advise. I am trying to install the software above on a windows 8 machine for the company I work for. Initially I installed it but when I tried to do the wdeploy predeployall I got an error with acess denied to sAPJVM, it didn't actually exist in the win64_X64 folder. After reading abit, I decided to uninstall and re-install. Howver the re-install failed with the following error
java virtual machine launcher
could not find main class: com/businessobjects/sdk/biar/utility/xsdutility. program will exit
Now I can't uninstall or install so stuck in abit of a limbo. I also notice that the SAPJVM is not there either.
Can anyone offer advise on how I get over this.
thanks
It turns out if your using a tomcat server and the server is on another box, you need to run cmd as the administrator. This was my issue.
First, I've read many other posts, and none of the solutions posted seem to be working. Not sure what im missing exactly, but in any case nothings working. Secondly, I am pretty new to the dev world, ruby, rails and programming.
I've tried copying .dlls from folders and i think i have the 64 bit version installed of my sql and ruby so not sure if thats an issue. I think my processor should be x64 bit but when I look at my system properties it only says windows os 64 bit, nothing about cpu being 64 bit. Could this be an issue? the error msg im reciving when I try to launch rails server from my rails application using:
c:\sites\rails s
I get this:
c:/ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2.rb:8:in `requir
e': 193: %1 is not a valid Win32 application. - c:/ruby200-x64/lib/ruby/gems/2
.0.0/extensions/x64-mingw32/2.0.0/mysql2-0.3.15/mysql2/mysql2.so (LoadError)
Followed by more msg.
A few questions I have. Would I be better off installing a partition of linux and doing dev work in that? Also, I am following along with lynda ruby on rails 4 essential training and a lot of it is done on mac. Is this going to be useful being on a windows machine? Would it be easier just using the default database system instead of mysql. My whole goal right now is just to start creating and understanding simple web apps and getting familiar with how the systems work.
What other advice/comments regarding getting into web dev programming and computer tech in general. Any helpful comments greatly appreciated, thanks so much.
I got a community server version of MySQL5.6 for windows7 32 bit.
and also downloaded windows installer for the same windows version.
Everything was prepared correctly.
I saw on a blog giving me a step-by-step manual for installing MySQL 5.6 on winodws7 32bit.
I did the instruction accordingly and it always stops processing in the phrase of starting service. I completely don't know what the problem is.
I googled it for like three hours and got nothing relevant to this problem.
It never processes any further without any kind of alerts, no matter how much I wait.
Please help me out.
My OS
Windows7 Ultimate K 32bit, Service Pack1
TURN OFF WINDOWS FIREWALL COMPLETELY BEFORE INSTALLING
This was one of the only threads I could find on this issue and the current answers did not cut the mustard for me.
MySQL 5.6.21, both x86 and x64, did not want to get past "Starting Server" and would give me the "MySQL install taking longer than expected" message.
I tried all of the registry cleaner, folder deletions, etc to no avail.
I am running Windows 7 x64 and I finally decided to check the event viewer to find this:
0x80070422 turns out to be some unspecified firewall error and boom, it struck me like lightning.
I hope this post helps future visitors!
Have you installed other version of MySQL before? I have experienced this case ,but I installed MySQL5.5 and uninstalled it. I solved it by clearing regedit and deleting the folder of MySQL in the directory(C:\ProgramData.This directory is hidden by default in Windows.),then reinstalled it.
Follow this link http://tadeparti.com/pages/?page_id=808.
And do remember to delete everything under the C:\program files\mysql folder, including the odbc stuff if you have.